I posted a patch (http://bugs.python.org/issue1677872) a while ago to
add support for reverse iteration through text files - i.e. making
this work:
for line in reversed(open(path)):
print line
It steps through the file backwards a line at a time, without reading
the entire file contents first - useful for scanning backwards though
big log files for example.
Christian Heimes commented that there's a reasonable chance of it
being accepted, so I've updated the patch to work against the current
source, as well as adding unit tests and documentation.
Mark Russell
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com