Steve Holden <st...@holdenweb.com> wrote: > how about print [sys.stdin.readline() for i in range(5)] > > At least that won't consume the whole file.
+1 on this approach. Clear and obvious and not reliant on any library modules other than sys. itertools, what WAS I thinking? :) -- http://mail.python.org/mailman/listinfo/python-list