read a files particular line

Miki Tebeka miki.tebeka at zoran.com
Thu Oct 14 14:53:45 CEST 2004


Hello Frank,

> Hi,
> does anybody have an idea how to read a particular line of a file like awk's
> awk '{if( NR==12) print $0}' filename (reads lineno 12 of filename)
Check the documentation about the "linecache".

HTH.
--
------------------------------------------------------------------------
Miki Tebeka <miki.tebeka at gmail.com>
http://tebeka.spymac.net
The only difference between children and adults is the price of the toys



More information about the Python-list mailing list