Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'app,': 0.07; 'case)': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'separator.': 0.09; 'am,': 0.13; 'wrote:': 0.15; 'filenames': 0.16; 'natively,': 0.16; 'posix': 0.16; 'richardson': 0.16; 'windows?': 0.16; 'pm,': 0.16; 'this:': 0.16; '>>>': 0.16; '(perhaps': 0.19; 'starts': 0.19; 'support,': 0.21; 'primarily': 0.22; 'header:In-Reply-To:1': 0.22; 'fri': 0.23; 'though.': 0.23; 'works.': 0.23; '(or': 0.25; '(in': 0.26; 'windows': 0.26; 'users.': 0.28; 'sat,': 0.28; 'module': 0.30; '-0400': 0.30; 'over.': 0.30; 'looks': 0.30; 'translate': 0.31; 'this.': 0.31; 'chris': 0.32; 'explorer': 0.32; 'file.': 0.32; 'anyone': 0.33; 'actually': 0.33; 'to:addr:python-list': 0.34; 'header:X -Complaints-To:1': 0.34; 'header:User-Agent:1': 0.34; 'decide': 0.34; "can't": 0.34; 'uses': 0.35; "isn't": 0.35; 'folder': 0.35; 'switch': 0.35; 'skip:" 10': 0.36; 'but': 0.37; 'using': 0.37; 'received:org': 0.38; 'subject:: ': 0.38; 'think': 0.38; 'two': 0.38; 'case': 0.39; 'should': 0.39; 'talk': 0.39; 'header:Mime- Version:1': 0.39; 'help': 0.39; 'under': 0.39; 'to:addr:python.org': 0.39; 'might': 0.39; 'where': 0.40; 'ever': 0.65; 'here': 0.66; 'subject:!': 0.67; 'show': 0.67; '30,': 0.74; '11:43': 0.84; '2011:': 0.84; 'tel': 0.86; '-->': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Gelonida N Subject: Re: PyWart: os.path needs immediate attention! Date: Wed, 03 Aug 2011 11:52:46 +0200 References: <14874f59-a836-4031-a8c9-6b24f4d5e812@d7g2000vbv.googlegroups.com> <1311971809-sup-1144@2d2a55d49a8018d83ffdd9e06d> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: unicorn.dungeon.de User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 "" In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 48 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1312365181 news.xs4all.nl 23899 [2001:888:2000:d::a6]:36151 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10796 On 07/29/2011 11:43 PM, Chris Angelico wrote: > On Sat, Jul 30, 2011 at 6:44 AM, Corey Richardson 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.