http://docs.python.org/library/urlparse.html
edit: it returns a tuple of URL parameters. If you absolutely need this in the dictionary, it looks like you have to implement it yourself. (get a tuple, then assign it a dict)
string = "addressing scheme network location path query fragment_identifier".split()
url = urlparse.urlsplit("url")
dictionary = dict(zip(string,url))
Not sure if this line of the dictionary is valid, but it is something like this.
source
share