Bug report
If stderr is redirected, input() doesn't print the prompt. The same happens when stdout is redirected, but that is to be expected.
Code (in test.py):
x = input('prompt: ')
print(x)
When run:
> python test.py
prompt: text
text
> python test.py >out
text
> python test.py 2>err
text
text
The contents of out and err, respectively:
# out
prompt: text
# err
prompt:
The first and second cases are as expected. In the last case, the prompt is not printed, even though it should go into stdout, according to the documentation. Instead, it is printed to err.
Your environment
Reactions are currently unavailable
Bug report
If stderr is redirected, input() doesn't print the prompt. The same happens when stdout is redirected, but that is to be expected.
Code (in test.py):
When run:
The contents of out and err, respectively:
The first and second cases are as expected. In the last case, the prompt is not printed, even though it should go into stdout, according to the documentation. Instead, it is printed to err.
Your environment