Windows vs. Linux

andrew clarke mail at ozzmosis.com
Fri Aug 4 05:54:33 EDT 2006


On Tue, Aug 01, 2006 at 05:31:01PM +0200, Sybren Stuvel wrote:

> James Stroud enlightened us with:
> > its better to use:
> >
> >    os.path.join('my', 'favorite', 'dir')
> >
> > than
> >
> >    "\\".join(['my', 'favorite', 'dir'])
> >
> > because the latter will bonk on linux.
> 
> Ehm... replace that with "the latter with bonk on every OS except
> Microsoft Windows". Windows is the weird one in OS-land, because they
> are the only one that use the most widely used escape-character (the
> backslash) as path separator.

OS/2 (and eComStation) also uses the backslash as the path separator.



More information about the Python-list mailing list