When you have a web server listening on a single IP address but serving several domains, it's quite common to run:
$ curl -H "Host: domain" http://ip_address/path/to/the/page.html
if you need to view that domain directly pointing to the web server (so avoiding any balancers or network "magics" you might have in place).
Well, the question is: how to do that in Python? I find my answer in the httplib module:
conn = httplib.HTTPConnection("ip_address")
conn.putrequest("GET", "/", skip_host=True)
res = conn.getresponse()