urllib2.splituser()

urllib2.splituser(host)[source]

splituser(‘user[:passwd]@host[:port]’) –> ‘user[:passwd]’, ‘host[:port]’.