File Name Format

Diez B. Roggisch deets at nospam.web.de
Tue May 8 06:38:16 EDT 2007


Anand wrote:

> Greetings,
> 
> How do I convert programmatically the file names from WIN32 to UNIX
> format?
> 
> A code snippet would be of great help.
> We are new to python! :)

unix_name = win_name.replace("\\", "/")

But this of course won't work for anything that starts with a drive letter
for example.

Diez



More information about the Python-list mailing list