Hirokazu Yamamoto <[email protected]> added the comment:
With following patch for investigation, (release30-maint)
Index: Lib/io.py
===================================================================
--- Lib/io.py (revision 70450)
+++ Lib/io.py (working copy)
@@ -57,6 +57,7 @@
import os
import abc
+import sys
import codecs
import _fileio
# Import _thread instead of threading to reduce startup cost
@@ -931,6 +932,7 @@
while True:
# Read until EOF or until read() would block.
chunk = self.raw.read()
+ print("============>", repr(chunk), file=sys.stderr)
if chunk in empty_values:
nodata_val = chunk
break
///////////////////////
I got this result.
>>> sys.stdin.read()
abc
^Z
============> b'abc\n'
^Z
============> b''
'abc\n'
To get empty chunk, we need to hit CTRL-Z twice.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue5505>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com