Reading a large bz2 textfile exits early

Steven D'Aprano steven at REMOVE.THIS.cybersource.com.au
Mon Feb 22 03:02:01 EST 2010


On Mon, 22 Feb 2010 07:49:51 +0100, Norman Rieß wrote:

> This is the actual code:
> 
> source_file = bz2.BZ2File(file, "r")
> for line in source_file:
>      print line.strip()
> 
> print "Exiting"
> print "I used file: " + file


Have you verified that the bz file is good by opening it in another 
application?



-- 
Steven



More information about the Python-list mailing list