Skip to content

Commit ac0b889

Browse files
committed
Fixing Issue7399 - Fixing an example of urllib usage.
1 parent fbacb06 commit ac0b889

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)