[issue26290] fileinput and 'for line in sys.stdin' do strange mockery of input buffering

2016-02-04 Thread Don Hatch
New submission from Don Hatch: Iterating over input using either 'for line in fileinput.input():' or 'for line in sys.stdin:' has the following unexpected behavior: no matter how many lines of input the process reads, the loop body is not entered until either (1) at least 8193 chars have been

[issue26290] fileinput and 'for line in sys.stdin' do strange mockery of input buffering

2016-02-04 Thread Don Hatch
Don Hatch added the comment: Possibly related to http://bugs.python.org/issue1633941 . Note that the matrix of GOOD and BAD versions and input methods is exactly the same for this bug as for that one. To verify: run each of the 6 python commands I mentioned on its own, being sure to type

[issue1633941] for line in sys.stdin: doesn't notice EOF the first time

2016-02-04 Thread Don Hatch
Don Hatch added the comment: I've reported the unfriendly input withholding that several people have observed and mentioned here as a separate bug: http://bugs.python.org/issue26290 . The symptom is different but I suspect it has exactly the same underlying cause (incorrect use of stdio