summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2008-06-23 04:41:59 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2008-06-23 04:41:59 (GMT)
commitaca8fd7a9dc96143e592076fab4d89cc1691d03f (patch)
treef18d273e3f72b917139e07f3e6e4d72a5119fd94 /Doc/tutorial
parentd11a44312f2e80a9c4979063ce94233f924dcc5b (diff)
downloadcpython-aca8fd7a9dc96143e592076fab4d89cc1691d03f.zip
cpython-aca8fd7a9dc96143e592076fab4d89cc1691d03f.tar.gz
cpython-aca8fd7a9dc96143e592076fab4d89cc1691d03f.tar.bz2
Documentation updates for urllib package. Modified the documentation for the
urllib,urllib2 -> urllib.request,urllib.error urlparse -> urllib.parse RobotParser -> urllib.robotparser Updated tutorial references and other module references (http.client.rst, ftplib.rst,contextlib.rst) Updated the examples in the urllib2-howto Addresses Issue3142.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/stdlib.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/tutorial/stdlib.rst b/Doc/tutorial/stdlib.rst
index 66e73a9..b0c6e8e 100644
--- a/Doc/tutorial/stdlib.rst
+++ b/Doc/tutorial/stdlib.rst
@@ -147,11 +147,11 @@ Internet Access
===============
There are a number of modules for accessing the internet and processing internet
-protocols. Two of the simplest are :mod:`urllib2` for retrieving data from urls
-and :mod:`smtplib` for sending mail::
+protocols. Two of the simplest are :mod:`urllib.request` for retrieving data
+from urls and :mod:`smtplib` for sending mail::
- >>> import urllib2
- >>> for line in urllib2.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl'):
+ >>> import urllib.request
+ >>> for line in urllib.request.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl'):
... if 'EST' in line or 'EDT' in line: # look for Eastern Time
... print(line)