This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients jaraco, r.david.murray, zach.ware
Date 2012-06-14.17:14:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1339694090.52.0.605367217878.issue15068@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-06-14 17:14:50zach.waresetrecipients: + zach.ware, jaraco, r.david.murray
2012-06-14 17:14:50zach.waresetmessageid: <1339694090.52.0.605367217878.issue15068@psf.upfronthosting.co.za>
2012-06-14 17:14:49zach.warelinkissue15068 messages
2012-06-14 17:14:49zach.warecreate