On Mon, Sep 19, 2016 at 3:07 PM, Oleg Broytman <p...@phdru.name> wrote:
> [Ctrl+D] also recognized as EOF only at the start of an input.
You're right. I was mixing it up with sys.stdin.buffer.raw.read(), for
which Ctrl+D can end the read anywhere if entered twice. Having to
enter it twice may be a bug, because os.read(0, 100) works fine.
So making it compatible with GNU readline is more complicated, but I
think it's possible. If the Ctrl+D isn't at the start of the line, it
could write the result up to the "\x04" back to the input buffer and
resume the read.
Python-ideas mailing list
Code of Conduct: http://python.org/psf/codeofconduct/