title: python stdin eof
body: <p>How to pass python eof to stdin </p>
  
  <p>here is my code </p>
  
  <pre><code>p = Popen(commd,stdout=PIPE,stderr=PIPE,stdin=PIPE)
  o = p.communicate(inputstring)[0]
  </code></pre>
  
  <p>when i run the commd in command line after i input the inputstring windows still expecting a Ctrl+Z  to finish accepting input.</p>
  
  <p>How can I pass eof or Ctrl+Z in program?</p>
  
  <p>Thanks!</p>