title: Test if a Popen process is waiting for input
body: <p>I start a process with POpen and under normal circuimstances it should just do a job and write things to stdout which I then capture.  In exceptional cases the process will fallback to an interactive mode and wait for user input.  How can I detect that case and react appropriately?</p>