force urllib not use proxy

kentsin at poboxes.com kentsin at poboxes.com
Fri Nov 24 10:24:46 EST 2000


A few days back, I report to the list that urllib do not work with MS 
proxy.

I further test rebol, and found it works without proxy setting but 
fail with proxy set.

So, I decide to give urllib a try with no proxy info set. However, 
even the 

urllib.getproxies_environment() gives {} which indicate no proxy info 
is set. 

However, 

urllib.getproxies() gives {'http':'http://Server:80'} 

print urllib.urlopen('http://www.python.org/').headers gives

Server: Microsoft-IIS/4.0
Date: Fri, 24 Nov 2000 15:11:05 GMT
Proxy-Authenticate: NTLM

further indicate that the proxy server is called instead. The result 
of trying to read the url return null string.

How could I force urllib to use the sock agent instead of try the 
proxy server? 

Rgs,

Kent Sin





More information about the Python-list mailing list