[issue7399] Possible bug in Python Tutorial

2010-02-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed in r78325, r78326. -- assignee: georg.brandl -> orsenthil nosy: +orsenthil resolution: -> fixed status: open -> closed ___ Python tracker __

[issue7399] Possible bug in Python Tutorial

2009-11-26 Thread R. David Murray
R. David Murray added the comment: The example is indeed wrong. urlopen is returning an object that emits binary data. The error comes from using 'in' on incompatible types. The solution is to encode the data with an appropriate encoding, once you figure out what that is. -- nosy: +r

[issue7399] Possible bug in Python Tutorial

2009-11-26 Thread David Henretty
New submission from David Henretty : Hi, In the v3.1.1 Python Tutorial (section 10.7 - Internet Access), the sample code (shown below) results in the following error :- from urllib.request import urlopen for line in urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl'): if 'EST' in line