[issue5505] sys.stdin.read() doesn't return after first EOF on Windows
Fan Decheng
report at bugs.python.org
Wed Mar 18 10:20:34 CET 2009
New submission from Fan Decheng <fandecheng at gmail.com>:
Platform: Windows Vista x64
Python version: 3.0.1 x64
When I use sys.stdin.readlines(), it correctly ends when I enter ^Z
(ctrl-Z) on the console (this is the EOF on the console). However when
I call sys.stdin.read(), it doesn't end when ^Z is entered. It ends
when I enter the second ^Z.
Repro steps:
1. Open python.
2. Type:
import sys
sys.stdin.read()
3. Type:
Hello
^Z
4. Note the above ^Z should be followed by a Return.
Result:
The function call doesn't end. If I enter another ^Z, it ends.
Expected result:
The function call ends.
----------
components: Library (Lib)
messages: 83736
nosy: r_mosaic
severity: normal
status: open
title: sys.stdin.read() doesn't return after first EOF on Windows
type: behavior
versions: Python 3.0
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5505>
_______________________________________
More information about the Python-bugs-list
mailing list