Barry A. Warsaw <ba...@python.org> added the comment:

This may end up being just a documentation issue.  If the environment
has http_proxy set, you do get a ProxyHandler automatically.

>>> import os
>>> os.environ['http_proxy'] = 'localhost'
>>> from urllib2 import build_opener
>>> build_opener().handlers
[<urllib2.ProxyHandler instance at 0x7fb664ec6e18>,
<urllib2.UnknownHandler instance at 0x7fb664eca050>,
<urllib2.HTTPHandler instance at 0x7fb664eca710>,
<urllib2.HTTPDefaultErrorHandler instance at 0x7fb664ecaa70>,
<urllib2.HTTPRedirectHandler instance at 0x7fb664ecad88>,
<urllib2.FTPHandler instance at 0x7fb664ecae60>, <urllib2.FileHandler
instance at 0x7fb664ecaf38>, <urllib2.HTTPSHandler instance at
0x7fb664ece3b0>, <urllib2.HTTPErrorProcessor instance at 0x7fb664ece128>]

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7152>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to