Martin Panter added the comment:
This has been discovered before: Issue 1927, with a simple patch. The choice
between stdout and stderr seems to be rather complicated, so the patch may need
a bit more work.
--
nosy: +martin.panter
resolution: -> duplicate
status: open -> closed
supers
New submission from Jason R. Coombs:
The built-in function 'input' appears to be sending the prompt to stderr
instead of stdout, as the docs state it should.
$ python3.5 -c "print('stdout'); import sys; print('stderr', file=sys.stderr);
input('foo')" 2> errors.txt
stdout
hello
$ cat errors.txt