title: Python - Spawn/Run a New Process Using Shell's stdin and stdout
body: <p>I want to execute a non-python program from within python. The non-python program prompts the user for a password so I want stdin to be routed to that subprocess. Similarly, the subprocess has some stdout which I want to be printed to the console. When the subprocess terminates, I would like the parent python program to continue executing.</p>
  
  <p>This seems so simple yet I'm having a hard time figuring out how to do it. The problem is that there are too many ways to do something very similar (os.spawn, os.exec, commands.<em>, subprocess.</em>, etc).</p>