use browser setting for internet

John J. Lee jjl at
Sun Jan 8 16:59:34 EST 2006

"Wish" <wgandhi at> writes:

> Hi
> I have a problem with my script in python which uses xmlrpc. The script
> loses internet connection when it is used behind a firewall. I realize
> that the firewall is specified by using the http_proxy environment
> variable. However, the proxy server is automatically configured. I dont
> have access to its port or the IP.
> I have seen applications which have a select box to use the internet
> connection setting of the browser to connect to the web. I dont know
> how to access this connection setting in Python. Any help will be much
> appreciated..

What OS?

On Windows, urllib.getproxies() should get you the info you need if IE
is correctly configured (and both urllib and urllib2 use this --
though the @ syntax is somewhat broken in urllib2, IIRC).

Disclaimer: I never seem to have to jump through any proxy or auth
hoops recently, so I'm not very reliable on this...


More information about the Python-list mailing list