468,554 Members | 1,435 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,554 developers. It's quick & easy.

How to disable urllib2 HTTP proxy on Windows?

**** Post for FREE via your newsreader at post.usenet.com ****

When using urllib2.urlopen() on my Windows 2000 machine at work, I was
puzzled that I kept getting back authentication errors from our Internet
proxy server (I was trying to contact an internal machine). Upon digging
into the code a little, I found that urllib2 was pulling the proxy
information out of the Windows registry (Internet Explorer uses these
settings). However, the browser also had settings to disable use of the
proxy for local addresses, and any specific addresses or wildcards I gave
it. urllib2 seemed to be ignoring those.

In the Python library reference, I read that setting the HTTP_PROXY
environment variable could set a proxy, as could installing a new opener.
However, I tried to turn off proxy support by setting HTTP_PROXY="", and I
got an error for my trouble (don't recall exact error right now-- am at
home on my GNU/Linux system). Is it possible to turn off proxy support in
Python while leaving the browser settings untouched? I was really quite
surprised when I found out that Python was using the browser's proxy
settings on my behalf.

Thanks,
Carl Waldbieser

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
http://www.usenet.com
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Jul 18 '05 #1
0 1793

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by O. Koch | last post: by
4 posts views Thread by bmiras | last post: by
4 posts views Thread by Fuzzyman | last post: by
1 post views Thread by Ray Slakinski | last post: by
1 post views Thread by tomazi75-nospam(at)gmail.com | last post: by
6 posts views Thread by Alejandro Dubrovsky | last post: by
1 post views Thread by Alessandro Fachin | last post: by
6 posts views Thread by Jack | last post: by
1 post views Thread by Gilles Ganault | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.