os.path.normpath() for URLs?

Robert Dailey rcdailey at gmail.com
Tue Aug 5 00:09:42 CEST 2008


I'm currently trying to parse relative URLs, but I want to make them
absolute. In other words, I want to normalize the URLs. However, I don't
want to have to write this logic myself if it is already provided. I was
thinking of somehow tricking os.path.normpath() as a last resort. This is
for subversion URLs, for those wondering. Basically, I need to turn the
following URL:


Into this:


Does anyone know a way I can do this? Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080804/993b494b/attachment.html>

More information about the Python-list mailing list