cross platform accessing paths (windows, linux ...)

David Smith dns4 at cornell.edu
Fri Mar 13 08:40:08 EDT 2009


Vlastimil Brom wrote:
> 2009/3/13 hendra kusuma <penguinroad at gmail.com>:
>> you may want to use os.sep to replace manually written "/" "\" ":" for each
>> os
>> I heard that unix/linux use "/" as directory separator while windows use "\"
>> and mac os use ":"
>>
> Thanks for the notice about the ":" path separator on mac;
> windows uses "\" but normally also accepts "/".
> Now I see, the diversity is yet greater, than I thought (cf.
> http://en.wikipedia.org/wiki/Path_(computing)
> 
> regards
>    Vlasta

The ':' separator is for old Mac systems using Mac OS prior to version
10.0.  As of 10.0, they've moved to a unix based environment where the
path separator is now a '/' character.  There's been enough time passed
you'll have a very hard time finding one of the old systems.

--David



More information about the Python-list mailing list