Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b63c3d

Browse files
committed
Merged revisions 78325 via svnmerge from
svn+ssh://[email protected]/python/branches/py3k ........ r78325 | senthil.kumaran | 2010-02-22 22:47:22 +0530 (Mon, 22 Feb 2010) | 2 lines Fixing Issue7399 - Fixing an example of urllib usage. ........
1 parent 3fda93e commit 3b63c3d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Doc/tutorial/stdlib.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ from urls and :mod:`smtplib` for sending mail::
152152

153153
>>> from urllib.request import urlopen
154154
>>> for line in urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl'):
155+
... line = line.decode('utf-8') # Decoding the binary data to text.
155156
... if 'EST' in line or 'EDT' in line: # look for Eastern Time
156157
... print(line)
157158

0 commit comments

Comments
 (0)