summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2009-12-24 02:21:03 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2009-12-24 02:21:03 (GMT)
commita1e845084f0bce8d0baec2461382aaa362258c38 (patch)
treeba2a65f1d0f4381d3eea9897b7acdb9ee047f0cd /Doc/library
parent17e1c127874273b05961462d922429fce395c53f (diff)
downloadcpython-a1e845084f0bce8d0baec2461382aaa362258c38.zip
cpython-a1e845084f0bce8d0baec2461382aaa362258c38.tar.gz
cpython-a1e845084f0bce8d0baec2461382aaa362258c38.tar.bz2
Merged revisions 77018 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77018 | senthil.kumaran | 2009-12-24 07:48:14 +0530 (Thu, 24 Dec 2009) | 3 lines Fix for Issue7570: Error in urllib2 example. ........
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/urllib2.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst
index 3e75f8c..cf889cc 100644
--- a/Doc/library/urllib2.rst
+++ b/Doc/library/urllib2.rst
@@ -945,10 +945,10 @@ programmatically-supplied proxy URLs, and adds proxy authorization support with
:class:`ProxyBasicAuthHandler`. ::
proxy_handler = urllib2.ProxyHandler({'http': 'http://www.example.com:3128/'})
- proxy_auth_handler = urllib2.HTTPBasicAuthHandler()
+ proxy_auth_handler = urllib2.ProxyBasicAuthHandler()
proxy_auth_handler.add_password('realm', 'host', 'username', 'password')
- opener = build_opener(proxy_handler, proxy_auth_handler)
+ opener = urllib2.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')