windows / unix path

Marcin201 marcin201 at gmail.com
Sat Oct 18 21:00:03 CEST 2008


Is there an built-in functionality in python to convert Windows paths
to Unix paths?  I am running into problems when creating data files on
Windows and the running them on a Unix platform.  I create paths using
os.path.join.

os.path.join('Pictures', '01.jpg') returns 'Pictures\\01..jpg' on
Win.  When I read files created on Win under Unix this is a problem,
python cannot open 'Pictures\\01.jpg'

Thanks,

Marcin



More information about the Python-list mailing list