Oops, my mistake, I did read your code, as well as all the others and I had your code mixed with another submission. In that case, excellent contribution =D

On 10/19/06, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
Chris Hengge wrote:
> More on that.. some of the file I work with are thousands of lines
> long... one is even 10's of thousands.. so reading the entire thing
> into ram is MUCH faster then reading line by line with the filestream
> open.
Did you look at my code?
It doesn't read the whole thing into ram, nor does it read line by line.
It seeks to the end of the file (should be extremely fast)
and reads backwards until it gets to a newline char.
In other words: Very fast, and no extra ram usage.
HTH,
-Luke

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to