urllib2 disable proxy

Richie Hindle richie at entrian.com
Fri Jan 4 10:34:48 CET 2008


Hi Dimitris,

> I've been looking for a way to explicitly disable the use of proxies with 
> urllib2, no matter what the environment dictates. Unfortunately I can't find 
> a way [...]

Would changing the environment work?  Like this:

>>> del os.environ['http_proxy']
>>> do_stuff_with_urllib2()

-- 
Richie Hindle
richie at entrian.com



More information about the Python-list mailing list