[issue17620] Python interactive console doesn't use sys.stdin for input

Antoine Pitrou report at bugs.python.org
Wed Jul 30 17:29:16 CEST 2014


Antoine Pitrou added the comment:

Yes, it is. GNU readline will use a FILE*. Apparently, one can customize this behaviour, see http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC25

"""Variable: rl_getc_func_t * rl_getc_function
    If non-zero, Readline will call indirectly through this pointer to get a character from the input stream. By default, it is set to rl_getc, the default Readline character input function (see section 2.4.8 Character Input). In general, an application that sets rl_getc_function should consider setting rl_input_available_hook as well. """

It is not obvious how that interacts with special keys, e.g. arrows.

----------

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


More information about the Python-bugs-list mailing list