Sébastien SAUVAGE nospam at sebsauvage.net
Mon Jan 28 18:24:27 CET 2002

"A" <printers at sendme.cz> wrote in news:mailman.1012234658.29707.python-
list at python.org:

> Hi,
> Is there anybody who has ever used 
> URLLIB together with PROXY successfully?
> I tried 
> import os,urllib
> os.environ["http_proxy"]=''
> RUR=urllib.urlretrieve('http://www.seznam.cz/index.html','Saved.htm'
> )
> but I do not think  it does  work.
> I will get the page but it does not go through proxy.

It worked for me.

I used the same syntax:

os.environ['http_proxy'] = ''
page = urllib.urlopen('http://sebsauvage.net/index.html').read()

Note that the current version of Python/urllib does not support password-
access proxies.

Sébastien SAUVAGE
sebsauvage at sebsauvage dot net

More information about the Python-list mailing list