Hi Tim,
Thanks for the solution (and effort), and for teaching me some interesting new
tricks.
Happy 2009!
Ron.
-Original Message-
From: Tim Chase [mailto:python.l...@tim.thechases.com]
Sent: Thursday, January 01, 2009 20:04
To: Sebastian Bassi
Cc: python-list@python.org
Subject: Re:
Hi,
I have a very big text file: I need to find the place where the last line
begins (namely, the offset of the one-before-the-last '\n' + 1).
Could you suggest a way to do that without getting all the file into memory (as
I said, it's a big file), or heaving to readline() all lines (ditto) ?
On Thu, Jan 1, 2009 at 2:19 PM, Barak, Ron ron.ba...@lsi.com wrote:
I have a very big text file: I need to find the place where the last line
begins (namely, the offset of the one-before-the-last '\n' + 1).
Could you suggest a way to do that without getting all the file into memory
(as I said,
Barak, Ron wrote:
Hi,
I have a _very_ big text file: I need to find the place where the last
line begins (namely, the offset of the one-before-the-last '\n' + 1).
Could you suggest a way to do that without getting all the file into
memory (as I said, it's a big file), or heaving to
Sebastian Bassi wrote:
On Thu, Jan 1, 2009 at 2:19 PM, Barak, Ron ron.ba...@lsi.com wrote:
I have a very big text file: I need to find the place where the last line
begins (namely, the offset of the one-before-the-last '\n' + 1).
Could you suggest a way to do that without getting all the file