[Python-checkins] r77020 - in python/branches/py3k: Doc/library/urllib.request.rst

senthil.kumaran python-checkins at python.org
Thu Dec 24 03:24:37 CET 2009


Author: senthil.kumaran
Date: Thu Dec 24 03:24:37 2009
New Revision: 77020

Log:
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.
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Doc/library/urllib.request.rst

Modified: python/branches/py3k/Doc/library/urllib.request.rst
==============================================================================
--- python/branches/py3k/Doc/library/urllib.request.rst	(original)
+++ python/branches/py3k/Doc/library/urllib.request.rst	Thu Dec 24 03:24:37 2009
@@ -1116,10 +1116,10 @@
 :class:`ProxyBasicAuthHandler`. ::
 
    proxy_handler = urllib.request.ProxyHandler({'http': 'http://www.example.com:3128/'})
-   proxy_auth_handler = urllib.request.HTTPBasicAuthHandler()
+   proxy_auth_handler = urllib.request.ProxyBasicAuthHandler()
    proxy_auth_handler.add_password('realm', 'host', 'username', 'password')
 
-   opener = build_opener(proxy_handler, proxy_auth_handler)
+   opener = urllib.request.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')
 


More information about the Python-checkins mailing list