Converting relative URLs to absolute

brueckd at tbye.com brueckd at tbye.com
Mon Mar 18 10:58:10 EST 2002


On 18 Mar 2002, Paul Boddie wrote:

> <brueckd at tbye.com> wrote in message news:<mailman.1016224116.19523.python-list at python.org>...
> >
> > Rather than add a new module, why not add more functionality to the
> > urlparse module in the standard distribution? (what functionality do you
> > need beyond what's already there, anyway?)
>
> I wouldn't want to add a new module - it's most interesting to tidy up
> what's already there, adding better "split" functions to urllib (and
> urllib2), and adding some "join" functions too. I certainly wouldn't
> advocate adding a huge dependency on some other library, even though
> some interesting candidates exist.

But URL split and join functions already exist in the urlparse module
(urlparse, *not* urllib). See urlparse's urlparse, urlunparse, and urljoin
functions - what don't they do that you need? They certainly handle the
make-relative-URLs-absolute problem.

-Dave





More information about the Python-list mailing list