Commit ac0b889e authored by Senthil Kumaran's avatar Senthil Kumaran

Fixing Issue7399 - Fixing an example of urllib usage.

parent fbacb06c
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment