Zachary Ware <zachary.w...@gmail.com> added the comment: I just tested on Python 3.2, and found something interesting; it seems a ^Z character on a line that has other input read in as a character. Also, other input after an EOF on its own means you still have to do two more EOFs to end.
Python 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import fileinput >>> lines = list(fileinput.input()) test testing ^Z ^Z >>> lines ['test\n', 'testing\n'] >>> lines = list(fileinput.input()) test testing^Z ^Z ^Z >>> lines ['test\n', 'testing\x1a\n'] >>> lines = list(fileinput.input()) testing^Z test ^Z testing ^Z ^Z >>> lines ['testing\x1a\n', 'test\n', 'testing\n'] Also, the documentation for fileinput doesn't mention EOF at all. ---------- nosy: +zach.ware versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15068> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com