From: KUNCEJ at mail.conservation.state.mo.us (Jeffrey Kunce)
Date: Wed, 21 Apr 1999 20:55:11 GMT
Subject: How do I use proxies with httplib?
Message-ID: <s71df69e.044@mail.conservation.state.mo.us>
X-UID: 583                                                  

>I want to use httplib through a proxy server and I can't seem to get
>it to work.  Someone in this group suggested setting an environment
>variable, like:
>
>SET http_proxy="12.189.130.200:80"

I don't know that that will work for httplib.
I know it *does* work with urllib. 
An example from memory (not tested):

import os, urllib
os.environ['http_proxy']="http://12.189.130.200:80"
f = urllib.urlopen('http://www.python.org')
data = f.read()

  --Jeff




