New submission from Manuel Muradás <mmura...@dieresys.com.ar>: We've found an error in an urllib2 example with Proxy Basic authentication. This is the example with the error: {{{ This example replaces the default ProxyHandler with one that uses programmatically-supplied proxy URLs, and adds proxy authorization support with ProxyBasicAuthHandler.
proxy_handler = urllib2.ProxyHandler({'http': 'http://www.example.com:3128/'}) proxy_auth_handler = urllib2.HTTPBasicAuthHandler() proxy_auth_handler.add_password('realm', 'host', 'username', 'password') opener = build_opener(proxy_handler, proxy_auth_handler) # This time, rather than install the OpenerDirector, we use it directly: opener.open('http://www.example.com/login.html') }}} Attached you will find a patch with the fix. ---------- assignee: georg.brandl components: Documentation files: urllib2.patch keywords: patch messages: 96843 nosy: dieresys, georg.brandl severity: normal status: open title: Error in urllib2 example versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file15668/urllib2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7570> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com