Patrick David wrote:
Hello NG,

I am searching for a way to jump to a specific line in a text file, let's
say to line no. 9000.
Is there any method like file.seek() which leads me to a given line instead
of a given byte?

Hope for help
Patrick

Others have given the general answer (No), but if you are lucky enough to have FIXED length lines you can jump by just calculating the byte offset of the beginning character in line 9000 by using file.seek() and then read the bytes. You didn't say anything about the format of the file.

-Larry
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to