Re: Reading a large bz2 textfile exits early

2010-02-22 Thread Stefan Behnel
Lie Ryan, 22.02.2010 14:29: > On 02/22/10 19:43, Norman Rieß wrote: >> Am 02/22/10 09:02, schrieb Steven D'Aprano: >>> 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:

Re: Reading a large bz2 textfile exits early

2010-02-22 Thread Norman Rieß
Am 02/22/10 14:29, schrieb Lie Ryan: On 02/22/10 19:43, Norman Rieß wrote: Am 02/22/10 09:02, schrieb Steven D'Aprano: 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

Re: Reading a large bz2 textfile exits early

2010-02-22 Thread Lie Ryan
On 02/22/10 19:43, Norman Rieß wrote: > Am 02/22/10 09:02, schrieb Steven D'Aprano: >> 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 "E

Re: Reading a large bz2 textfile exits early

2010-02-22 Thread Norman Rieß
Am 02/22/10 09:02, schrieb Steven D'Aprano: 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 th

Re: Reading a large bz2 textfile exits early

2010-02-22 Thread Steven D'Aprano
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

Re: Reading a large bz2 textfile exits early

2010-02-21 Thread Norman Rieß
Am 02/21/10 22:09, schrieb Dennis Lee Bieber: On Sat, 20 Feb 2010 23:12:50 +0100, Norman Rieß declaimed the following in comp.lang.python: Hello, i am trying to read a large bz2 compressed textfile using the bz2 module. The file is 1717362770 lines long and 8GB large. Using this code sour

Reading a large bz2 textfile exits early

2010-02-20 Thread Norman Rieß
Hello, i am trying to read a large bz2 compressed textfile using the bz2 module. The file is 1717362770 lines long and 8GB large. Using this code source_file = bz2.BZ2File(file, "r") for line in source_file: print line.strip() print "Exiting" print "I used file: " + file the loo