Reading just a few lines from a text file

draghuram at gmail.com draghuram at gmail.com
Tue Aug 23 17:53:56 EDT 2005


I just did strace on "tail -20 <filename>". Apparently, it does seek to
the end and reads enough data to cover 20 lines. I guess it is
calculating this "size" by counting 20 new lines .You may try to do the
same thing. 

Thanks,
Raghu.




More information about the Python-list mailing list