reading specific lines of a file

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Sat Jul 15 18:58:57 EDT 2006


In <mailman.8213.1152993897.27775.python-list at python.org>, Yi Xing wrote:

> 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.

Don't know how efficient the `linecache` module in the standard library is
implemented but you might have a look at it.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list