os.path.normpath
Hari Sekhon
hpsekhon at googlemail.com
Wed Aug 16 13:52:26 EDT 2006
grahamd at dscpl.com.au wrote:
> nathanbullock at gmail.com wrote:
>
>> I am using a windows box and passing a string like "../foo/../foo2" to
>> normpath which then returns "..\\foo2". But if this string is going
>> into a webpage link it should really be "../foo".
>>
>> Is there any way to tell os.path.normpath to act like we are an a unix
>> style box?
>>
>
> Use posixpath.normpath() instead.
>
>
I can't seem to find posixpath in the docs, but I can import posixpath
and a dir shows it does indeed have a normpath.
-h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060816/be2e99df/attachment.html>
More information about the Python-list
mailing list