[Pythonmac-SIG] Urllib huh?

Richard Gordon richard@richardgordon.net
Wed, 1 Aug 2001 11:15:29 -0400


At 3:24 PM +0100 8/1/01, tom smith wrote:
>Is this right?
>
> >>> import urllib
> >>> u = urllib
> >>> url = 'http://www.othermedia.com/blog/test'
> >>> print u.splithost(url)
>(None, 'http://www.othermedia.com/blog/test')
>
>I expected to get ['www.othermedia.com', '/blog/test']

leave off the http: and you will, e.g.,
url = '//www.othermedia.com/blog/test'


Richard Gordon
--------------------
Gordon Design
Web Design/Database Development
http://www.richardgordon.net