urllib2.localhost()

urllib2.localhost()[source]

Return the IP address of the magic hostname ‘localhost’.