>>>>> Yi Xing <[EMAIL PROTECTED]> (YX) wrote:

>YX> Hi All,
>YX> I want to read specific lines of a huge txt file (I know the line #). Each
>YX> line might have different sizes. Is there a convenient and fast way of
>YX> doing this in Python? Thanks.

Not fast. You have to read all preceding lines.
If you have to do this many times while the file does not change, you could
build an index into the file.
-- 
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: [EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to