Reading just a few lines from a text file

draghuram at draghuram at
Tue Aug 23 23:53:56 CEST 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. 


More information about the Python-list mailing list