title: How to write EOF to STDIN popen in python
body: <p>I have the following command run through popen:</p>
  
  <pre><code>p = subprocess.popen(["/usr/bin/whiptail", "--title", "\"Progress\"", "--gauge", "\"\"", "6", "50", "0"], stdout=subprocess.PIPE, stding=subprocess.PIPE)
  </code></pre>
  
  <p>To stop the whiptail command from running I need to send EOF to stdin.</p>
  
  <p>How do I send EOF to stdin in Python ?</p>
  
  <p>or I just call p.terminate()</p>