title: Using files as stdin and stdout for subprocess
body: <p>How do I replicate the following batch command using python subprocess module?</p>
  
  <pre><code>myprogram &lt; myinput.in &gt; myoutput.out
  </code></pre>
  
  <p>In other words, how do I run <code>myprogram</code> using the contents of <code>myinput.in</code> as the standard input and <code>myoutput.out</code> as standard output?</p>