title: Read from the terminal in Python
body: <p>How can I receive input from the terminal in Python?</p>
  
  <p>I am using Python to interface with another program which generates output from user input.
  I am using subprocess.Popen() to input to the program, but I can't set stdout to subprocess.PIPE because the program does not seem to flush ever, so everything gets stuck in the buffer.
  The program's standard output seems to be to print to terminal, and I see output when I do not redirect stdout.  However, I need Python to read and interpret the output which is now in the terminal.</p>
  
  <p>Sorry if this is a stupid question, but I can't seem to get this to work.</p>