Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10551
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'app,': 0.07; 'be:': 0.09; 'case)': 0.09; 'filename': 0.09; 'not?': 0.09; 'properly.': 0.09; 'separator.': 0.09; 'throw': 0.09; 'am,': 0.13; 'wrote:': 0.15; '"basename"': 0.16; 'agree.': 0.16; 'basename': 0.16; 'before!': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'natively,': 0.16; 'output?': 0.16; 'pathname': 0.16; 'posix': 0.16; 'richardson': 0.16; 'surprising': 0.16; 'windows?': 0.16; 'this:': 0.16; 'received:209.85.210.174': 0.19; 'received:mail- iy0-f174.google.com': 0.19; 'starts': 0.19; 'support,': 0.21; 'extension': 0.22; 'primarily': 0.22; 'maybe': 0.22; 'header:In- Reply-To:1': 0.22; 'fri': 0.23; 'though.': 0.23; 'works.': 0.23; '(or': 0.25; 'function': 0.26; '(in': 0.26; 'windows': 0.26; 'guess': 0.28; 'users.': 0.28; 'sat,': 0.28; 'message- id:@mail.gmail.com': 0.28; 'odd': 0.29; 'module': 0.30; '-0400': 0.30; 'over.': 0.30; 'returns,': 0.30; 'looks': 0.30; 'least': 0.31; 'translate': 0.31; 'certainly': 0.32; 'explorer': 0.32; 'rather': 0.33; 'people,': 0.33; 'anyone': 0.33; 'actually': 0.33; 'to:addr:python-list': 0.34; 'decide': 0.34; 'there': 0.34; "can't": 0.34; 'things': 0.34; 'uses': 0.35; "isn't": 0.35; 'folder': 0.35; 'switch': 0.35; 'skip:" 10': 0.36; 'some': 0.37; 'but': 0.37; 'using': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'everyone': 0.38; 'think': 0.38; 'case': 0.39; 'should': 0.39; 'talk': 0.39; 'to:addr:python.org': 0.39; 'might': 0.39; 'received:209': 0.40; "i'd": 0.40; 'where': 0.40; 'agreed': 0.40; 'skip:r 20': 0.40; 'ever': 0.65; 'here': 0.66; 'subject:!': 0.67; 'show': 0.67; 'anything,': 0.73; '30,': 0.74; '2011:': 0.84; 'this!': 0.84; '-->': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=VSGxeNIg9ZOL0mBGxNq7UZaEVNxbWjAHLehsIETqutI=; b=t8NijcVNKgBWPJjiVbB31hqnId79tJz/s18HdaVMl5P7rR9vqmnGe/bUbsNLOwgZx5 G63q4Am3uZOU4mdH+e6YjrnhpKwl1mDUo9ZPGcmQYqweUjfdsticzcKQaPhr6zC5iGM/ 76gYQqk3DJ4dx/35bixve7VoXgsNmbfaoaJ18= |
| MIME-Version | 1.0 |
| In-Reply-To | <1311971809-sup-1144@2d2a55d49a8018d83ffdd9e06d> |
| References | <14874f59-a836-4031-a8c9-6b24f4d5e812@d7g2000vbv.googlegroups.com> <1311971809-sup-1144@2d2a55d49a8018d83ffdd9e06d> |
| Date | Sat, 30 Jul 2011 07:43:15 +1000 |
| Subject | Re: PyWart: os.path needs immediate attention! |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1637.1311975798.1164.python-list@python.org> (permalink) |
| Lines | 68 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1311975798 news.xs4all.nl 23876 [2001:888:2000:d::a6]:56278 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:10551 |
Show key headers only | View raw
On Sat, Jul 30, 2011 at 6:44 AM, Corey Richardson <kb1pkl@aim.com> wrote:
> Excerpts from rantingrick's message of Fri Jul 29 13:22:04 -0400 2011:
>> * New path module will ONLY support one path sep!
>
> People who use windows are used to \ being their pathsep. If you show
> them a path that looks like C:/whatever/the/path in an app, they are
> going to think you are nuts. It isn't up to us to decide what anyone
> uses as a path separator. They use \ natively, so should we. If at
> any point Windows as an OS starts using /'s, and not support, actually
> uses (in Windows Explorer as default (or whatever the filebrowser's
> name is)), it would be great to switch over.
Just tested this: You can type c:/foldername into the box at the top
of a folder in Explorer, and it works. It will translate it to
c:\foldername though.
We are not here to talk solely to OSes. We are here primarily to talk
to users. If you want to display a path to the user, it's best to do
so in the way they're accustomed to - so on Windows, display
backslashes.
>> - normcase --> path = path.lower()
>
> Not quite, here are a few implementations of normcase (pulled from 2.7)
>
> # NT
> return s.replace("/", "\\").lower()
>
> # Mac (Correct in this case)
> return path.lower()
>
> # POSIX
> return s
>
> But I can't think of where I would ever use that. Isn't case important on
> Windows?
No, as is demonstrated by the three above; case isn't important on
Windows, but it is on Unix.
>> - normpath --> should not need this!
>
> Why not? It provides an OS-independent way to make the pathname look pretty,
> maybe for output? I don't really see a use for it, to be honest.
See above, we talk to users.
> But I'd
> rather there be a working solution in the stdlib than have everyone need to
> throw in their own that might not handle some things properly.
Absolutely!
>> * basename --> should be: filename
>
> I agree. The name is a carryover from basename(1) and I guess it's good for
> those people, but it certainly isn't the least surprising name. If anything,
> I would think the base is everything before!
Agreed that it's an odd name; to me, "basename" means no path and no
extension - the base name from r"c:\foo\bar\quux.txt" is "quux".
Unfortunately that's not what this function returns, which would be
"quux.txt".
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
PyWart: os.path needs immediate attention! rantingrick <rantingrick@gmail.com> - 2011-07-29 10:22 -0700
Re: PyWart: os.path needs immediate attention! Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-29 12:53 -0500
Re: PyWart: os.path needs immediate attention! harrismh777 <harmar@member.fsf.org> - 2011-07-29 14:41 -0500
Re: PyWart: os.path needs immediate attention! "Waldek M." <wm@localhost.localdomain> - 2011-07-29 21:55 +0200
Re: PyWart: os.path needs immediate attention! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-30 10:50 +1000
Function "modes" vs. separate functions (was: PyWart: os.path needs immediate attention!) Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-29 20:15 -0500
Re: Function "modes" vs. separate functions Ben Finney <ben+python@benfinney.id.au> - 2011-07-30 11:57 +1000
Re: Function "modes" vs. separate functions Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-29 21:28 -0500
Re: PyWart: os.path needs immediate attention! Terry Reedy <tjreedy@udel.edu> - 2011-07-30 09:48 -0400
Re: PyWart: os.path needs immediate attention! Robert Kern <robert.kern@gmail.com> - 2011-07-30 23:31 -0400
Re: PyWart: os.path needs immediate attention! Teemu Likonen <tlikonen@iki.fi> - 2011-07-29 23:07 +0300
Re: PyWart: os.path needs immediate attention! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-30 10:57 +1000
Re: PyWart: os.path needs immediate attention! Teemu Likonen <tlikonen@iki.fi> - 2011-08-01 11:19 +0300
Re: PyWart: os.path needs immediate attention! rantingrick <rantingrick@gmail.com> - 2011-08-02 09:03 -0700
Re: PyWart: os.path needs immediate attention! Chris Angelico <rosuav@gmail.com> - 2011-08-02 17:36 +0100
Re: PyWart: os.path needs immediate attention! Chris Angelico <rosuav@gmail.com> - 2011-07-30 06:25 +1000
Re: PyWart: os.path needs immediate attention! Corey Richardson <kb1pkl@aim.com> - 2011-07-29 16:44 -0400
Re: PyWart: os.path needs immediate attention! Alister Ware <alister.ware@ntlworld.com> - 2011-07-29 21:21 +0000
Re: PyWart: os.path needs immediate attention! Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-29 16:36 -0500
Re: PyWart: os.path needs immediate attention! Chris Angelico <rosuav@gmail.com> - 2011-07-30 07:43 +1000
Re: PyWart: os.path needs immediate attention! Terry Reedy <tjreedy@udel.edu> - 2011-07-29 19:30 -0400
Re: PyWart: os.path needs immediate attention! Michael Poeltl <michael.poeltl@univie.ac.at> - 2011-07-30 02:30 +0200
Re: PyWart: os.path needs immediate attention! Grant Edwards <invalid@invalid.invalid> - 2011-07-30 15:33 +0000
Re: PyWart: os.path needs immediate attention! Andrew Berg <bahamutzero8825@gmail.com> - 2011-07-30 10:56 -0500
Re: PyWart: os.path needs immediate attention! alex23 <wuwei23@gmail.com> - 2011-08-02 23:52 -0700
Re: PyWart: os.path needs immediate attention! Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-07-29 22:17 -0700
Re: PyWart: os.path needs immediate attention! Gelonida N <gelonida@gmail.com> - 2011-08-03 11:52 +0200
csiph-web