bugs at iter file() ?

dw dswj at plasa.com
Wed Jul 14 22:53:28 EDT 2004


Python 2.3.4, winxp:

I have a large text file that unknowingly contains ascii
character 1A, or chr(26). And doing this:

for line in file(sys.argv[1]):
     print line

would stop iteration at the specific line containing ascii
char 1A, without raising exception or warning, although
there were still remaining lines which has not been
iterated. I was wondering whether this was a bug in 
Python.

Thx.

--
  dody wijaya

===========================================================================================
"Gabung INSTANIA, dapatkan XENIA. Daftar di www.telkomnetinstan.com, langsung dapat akses Internet Gratis..
Dan ..ikuti "Instan Smile" berhadiah Xenia,Tour S'pore, Komputer,dll, info hub : TELKOM Jatim 0-800-1-467826 "
===========================================================================================



More information about the Python-list mailing list