diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-02-22 17:17:22 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-02-22 17:17:22 (GMT) |
commit | ac0b889e82e01740aaee788868afe7724cb141fd (patch) | |
tree | d44a0fae06c8c0c02b7956041ca99c4591479542 /Doc/tutorial | |
parent | fbacb06c9d8a4cb4f6b2e0dca01312725e14657a (diff) | |
download | cpython-ac0b889e82e01740aaee788868afe7724cb141fd.zip cpython-ac0b889e82e01740aaee788868afe7724cb141fd.tar.gz cpython-ac0b889e82e01740aaee788868afe7724cb141fd.tar.bz2 |
Fixing Issue7399 - Fixing an example of urllib usage.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r-- | Doc/tutorial/stdlib.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Doc/tutorial/stdlib.rst b/Doc/tutorial/stdlib.rst index d9a15fa..0f607c4 100644 --- a/Doc/tutorial/stdlib.rst +++ b/Doc/tutorial/stdlib.rst @@ -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) |