[issue24829] Use interactive input even if stdout is redirected

Adam Bartoš report at bugs.python.org
Tue Aug 25 20:57:54 CEST 2015


Adam Bartoš added the comment:

Behavior of which readline? GNU readline? Note that it is only one particular implmentation on one particular platform while Python should be as multiplatform as possible / viable.

And what behavior it is? More precisely, what incorrect behavior in Linux would it bring if the condition in 

    if (!isatty (fileno (sys_stdin)) || !isatty (fileno (sys_stdout)))
        rv = PyOS_StdioReadline (sys_stdin, sys_stdout, prompt);
    else
        rv = (*PyOS_ReadlineFunctionPointer)(sys_stdin, sys_stdout, prompt);

was replaced by `!isatty (fileno (sys_stdin))`?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24829>
_______________________________________


More information about the Python-bugs-list mailing list