Re: [Tutor] Reading large bz2 Files

2010-02-19 Thread Norman Rieß
Am 19.02.2010 22:24, schrieb Lie Ryan: > On 02/20/10 07:49, Norman Rieß wrote: > >> Am 19.02.2010 21:42, schrieb Lie Ryan: >> >>> On 02/19/10 23:42, Norman Rieß wrote: >>> >>> >>>> Hello, >>>> >>>>

Re: [Tutor] Reading large bz2 Files

2010-02-19 Thread Norman Rieß
Am 19.02.2010 22:03, schrieb Kent Johnson: > On Fri, Feb 19, 2010 at 7:42 AM, 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: >

Re: [Tutor] Reading large bz2 Files

2010-02-19 Thread Norman Rieß
Am 19.02.2010 21:42, schrieb Lie Ryan: > 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 lin

Re: [Tutor] Reading large bz2 Files

2010-02-19 Thread Norman Rieß
Am 19.02.2010 17:04, schrieb Steven D'Aprano: > My guess is one of two things: > (1) You are mistaken that the file is bigger than 4311 lines. > > (2) You are using Windows, and somehow there is a Ctrl-Z (0x26) > character in the file, which Windows interprets as End Of File when > reading files

[Tutor] Reading large bz2 Files

2010-02-19 Thread Norman Rieß
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? Thank you.