how to resolve Windows pathnames into cygwin ones

mgierdal at gmail.com mgierdal at gmail.com
Fri Jan 18 15:13:44 EST 2008


Well yes, I was hoping for a library function, but none provides it.
Thanks for the code. Works nicely.

On Jan 18, 12:12 pm, apatheticagnostic <apatheticagnos... at gmail.com>
wrote:
> Here we go then (are forward slashes valid in a filename in windows?)
> def path_into_cygpath(path):
>     drive, destination = path.replace('\\','/').split(':')
>     return '/cygdrive/' + drive.lower() + destination




More information about the Python-list mailing list