On Fri, Feb 19, 2010 at 7:42 AM, Norman Rieß <nor...@smash-net.org> wrote: > Hello, > > i am trying to read a large bz2 file with this code: > > source_file = bz2.BZ2File(file, "r") > for line in source_file: > print line.strip() > > But after 4311 lines, it stoppes without a errormessage. The bz2 file is > much bigger though. > How can i read the whole file line by line?
I wonder if it is dying after reading 2^31 or 2^32 bytes? It sounds a bit like this (fixed) bug: http://bugs.python.org/issue1215928 Kent _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor