Module
urlparse

Parse (absolute and relative) URLs.

See RFC 1808: "Relative Uniform Resource Locators", by R. Fielding, UC Irvine, June 1995.