Unnormalizing normalized path in Windows
duncan.booth at invalid.invalid
Sun Jun 29 16:13:30 CEST 2008
Julien <jphalip at gmail.com> wrote:
> In Windows, when a path has been normalized with os.path.normpath, you
> get something like this:
> C:/temp/my_dir/bla.txt # With forward slashes instead or backward
> Is it possible to revert that?
> I wonder if there's a standard function to do that...
Yes, it's called os.path.normpath. Did you actually try it before posting?
>>> print os.path.normpath('C:/temp/my_dir/bla.txt')
More information about the Python-list