1

I want input(prompt) to:

  • read from /dev/tty
  • write its prompt to stderr

I found this by searching around, but I could not find where readline_until_enter_or_signal is defined. It seems to only be defined in the C code, and inaccessible in normal Python. I don't know how to call such a method.

def call_readline(stdin, stdout, prompt):
    '''Implementation of PyOS_Readline() in the "readline" module'''
    rl_instream = stdin
    rl_outstream = stdout  # Readline writes to stdout
    return readline_until_enter_or_signal(prompt)
HappyFace
  • 3,439
  • 2
  • 24
  • 43

0 Answers0