Using subprocess wait() and poll()
<p>I am trying to write a small app that uses the <code>subprocess</code> module. </p>

<p>My program calls an external Bash command that takes some time to process. During this time, I would like to show the user a series of messages like this:</p>

<blockquote>
  <p>Processing. Please wait...<br/>
  The output is foo()</p>
</blockquote>

<p>How can I do this using <code>Popen.wait()</code> or <code>Popen.poll()</code>. I have read that I need to use the <code>Popen.returncode</code>, but how I can get it to actively check the state, I don't know.</p>
