On 02/19/10 23:42, Norman Rieß 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?

Is the bz2 file an archive[1]?

[1] archive: contains more than one file

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to