file delimiter in dependency of os

Thomas Steffen thomas.rademacher at nikocity.de
Sun Nov 2 11:39:15 CET 2003


Hallo,

I have pathes with different file delimiters
e.g.
/root/dir\mydir/myfile
C:\xxx/hh\gggg/myfile

How can I change the mistaken file delimiters in dependency of the
used os (win or unix) effectively?
unix: /root/dir\mydir --> /root/dir/mydir 
win: C:\xxx/hh\gggg/myfile --> C:\xxx\hh\gggg\myfile

Thanks for your hints Thomas




More information about the Python-list mailing list