title: Python execute command line,sending input and reading output
body: <p>How to achieve the following functionality:</p>
  
  <ol>
  <li>Python executes a shell command, which waits for the user to <code>input</code> something</li>
  <li>after the user typed the <code>input</code>, the program responses with some <code>output</code></li>
  <li>Python captures the <code>output</code></li>
  </ol>