Fixing Issue7399 - Fixing an example of urllib usage.

This commit is contained in:
Senthil Kumaran 2010-02-22 17:17:22 +00:00
parent fbacb06c9d
commit ac0b889e82
1 changed files with 1 additions and 0 deletions

View File

@ -152,6 +152,7 @@ from urls and :mod:`smtplib` for sending mail::
>>> from urllib.request import urlopen
>>> for line in urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl'):
... line = line.decode('utf-8') # Decoding the binary data to text.
... if 'EST' in line or 'EDT' in line: # look for Eastern Time
... print(line)