title: Python subprocess and user interaction
body: <p>I'm working on a GUI front end in Python 2.6 and usually it's fairly simple: you use <code>subprocess.call()</code> or <code>subprocess.Popen()</code> to issue the command and wait for it to finish or react to an error.  What do you do if you have a program that stops and waits for user interaction?  For example, the program might stop and ask the user for an ID and password or how to handle an error?  </p>
  
  <pre><code>c:\&gt; parrot
  Military Macaw - OK
  Sun Conure - OK
  African Grey - OK
  Norwegian Blue - Customer complaint!
  (r) he's Resting, (h) [Hit cage] he moved, (p) he's Pining for the fjords
  </code></pre>
  
  <p>So far everything I've read tells you how to read all output from a program only <strong>after</strong> it's finished, not how to deal with output while the program is still running.  I can't install new modules (this is for a LiveCD) and I'll be dealing with user input more than once.</p>