os.path and Path

Christian Heimes lists at cheimes.de
Thu Jun 16 12:32:04 EDT 2011


Am 16.06.2011 18:16, schrieb Ethan Furman:
> Steven D'Aprano wrote:
>> If Path is intended to be platform independent, then 
>> these two paths could represent the same location:
>>
>> 'a/b/c:d/e'  # on Linux or OS X
>> 'a:b:c/d:e'  # on classic Mac pre OS X
>>
>> and be impossible on Windows. So what's the canonical path it should be 
>> converted to?
> 
> Are these actual valid paths?  I thought Linux used '/' and Mac used ':'.

"c:d" is a valid directory name on Linux. :]

Christian




More information about the Python-list mailing list