urllib checks IE settings for proxy but ignores useful 'ProxyOverride' key

Andy Bulka abulka at netspace.net.au
Wed Dec 26 05:45:24 CET 2001


It seems that urllib.py has the smarts to look up the proxy settings
in the windows registry settings that you control via the IE browser. 
It checks the keys 'ProxyEnable' and 'ProxyServer' (to get the actual
proxy host/port value).

But urllib.py does NOT have the smarts to check the key
'ProxyOverride' which has a range of tcp ip addresses to NOT use
proxies on, as well as whether to bypass proxies for local addresses
(the value of the key 'ProxyOverride' contains '<local>' if this
option is turned on).

Surely this is an important omission and should be introduced into the
next version of python?

-Andy Bulka
WindowWare Multimedia
www.atug.com/andypatterns

> Julius Welby (jwelby at waitrose.com) wrote on Date: 2001-06-07 10:52:47 PST 
>
> At work I'm running Python 2.1 on W2k and using IE5.5 as my web browser.
> 
> To access the web I have to go through a proxy server, which requires
> authentication.
> 
> Problem: For a particular project, I want to access URL's on our *local*
> network, not on the web.
> 
> If I have a proxy set in IE5.5, I cant use urllib.urlopen to connect to a
> local resource, even though I've set IE not to use the proxy for local
> addresses, and specified the servers concerned in the "Do not use proxy
> server for addresses begining with:" field. (Belt and braces? Probably.)
> 
> To sucessfully use Python to access local pages I have to turn off the "Use
> proxy server" setting in IE5.5, so I can't use the web while I'm working
> with Python. This is becoming more of a problem as I want to be able to run
> Python based web services off my PC.
> 
> Can anybody give me any guidance how I can stop IE5.5 settings affecting
> urllib.urlopen, or even getting Python to recognise all of the settings (so
> not trying to use the proxy for local URLs)?



More information about the Python-list mailing list