urllib2.splithost()

urllib2.splithost(url)[source]

splithost(‘//host[:port]/path’) –> ‘host[:port]’, ‘/path’.