Mike Meyer wrote: > It would probably be more efficient to read blocks backwards and paste > them together, but I'm not going to get into that. > That actually is a pretty good idea. just reverse the buffer and do a split, the last line becomes the first line and so on. The logic then would be no different than reading from beginning of file. Just need to keep the last "half line" of the reversed buffer if the wanted one happens to be across buffer boundary.
-- http://mail.python.org/mailman/listinfo/python-list