bugs at iter file() ?

D

dw

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 "
===========================================================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top