[Python-ideas] shutil.tail(file, lines)
Giampaolo Rodolà
g.rodola at gmail.com
Tue Nov 8 19:20:45 CET 2011
This is something I need to do every once in a while and I think it
would be a good addition for shutil module.
Here:
http://stackoverflow.com/questions/136168/get-last-n-lines-of-a-file-with-python-similar-to-tail
...is a nice implementation which appears to be a good compromise in
terms of speed and memory consumption (it reads the file in chunks, no
more than 1024 bytes per-read).
What do you think?
--- Giampaolo
http://code.google.com/p/pyftpdlib/
http://code.google.com/p/psutil/
More information about the Python-ideas
mailing list