Oct. 4, 2011
4:03 p.m.
I thought of a somewhat elegant recipe for the readlines(maxlines) case: f = open(...)itertools.islice(f, maxlines) - John