Yi Xing wrote: > Hi All, > > I want to read specific lines of a huge txt file (I know the line #). > Each line might have different sizes. Is there a convenient and fast > way of doing this in Python? Thanks. > > Yi Xing
I once had to do a lot of random access of lines in a multi gigabyte log file. I found that a very fast way to do this was to build an index file containing the int offset in bytes of each line in the log file. I could post the code if you're interested. Peace, ~Simon -- http://mail.python.org/mailman/listinfo/python-list