Some more notes

Steve Holden steve at holdenweb.com
Sat Oct 23 10:53:41 EDT 2004


Peter Hansen wrote:

> bearophile wrote:
> 
>> Cliff Wells:
>>
>>> Why not just use "/"?
>>
>>
>> Okay, I'll use os.path.normcase to convert them.
> 
> 
> That's not necessary in almost all cases.  Windows happily(*)
> accepts forward slashes in all system calls.  The only place
> it does not is in the *shell* (aka command.com and cmd.exe).
> That means paths passed as arguments to os.system or the
> Popen gang need to be normcased, but for things like open()
> you don't need to bother.
> 
Having said which it's still good practice to use os.path functions to 
manipulate paths for forward compatibility with Windows 2007, which will 
change the separator to "^" :-)

regards
  Steve
-- 
http://www.holdenweb.com
http://pydish.holdenweb.com
Holden Web LLC +1 800 494 3119



More information about the Python-list mailing list