Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10796
| From | Gelonida N <gelonida@gmail.com> |
|---|---|
| Subject | Re: PyWart: os.path needs immediate attention! |
| Date | 2011-08-03 11:52 +0200 |
| References | <14874f59-a836-4031-a8c9-6b24f4d5e812@d7g2000vbv.googlegroups.com> <1311971809-sup-1144@2d2a55d49a8018d83ffdd9e06d> <CAPTjJmq5HbjQgF3E9yB2dynsYGzgyBnHBqyVhzNZ+J=QRtBsLQ@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1829.1312365181.1164.python-list@python.org> (permalink) |
On 07/29/2011 11:43 PM, Chris Angelico wrote:
> 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?
>
well normcase might help to find out, whether two filenames are the same.
under unix 'myfile' and 'myFile' would be different
under windows they would refer to the same file.
normcase (perhaps to be combined with normpath) can tel you this.
Back to comp.lang.python | Previous | Next — Previous 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