Some more notes

Peter Hansen peter at
Sat Oct 23 16:01:00 CEST 2004

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 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.


(*) There are theories that although Windows does accept
forward slashes, it does so only grudgingly.

More information about the Python-list mailing list