title: How to stop subprocess.Popen waiting for user input in python
body: <p>I have the following code in python:</p>
  
  <pre><code>import subprocess
  var = subprocess.Popen(["pdflatex","file.tex"])
  </code></pre>
  
  <p>Where var is a throw away variable because I don't care about the return variable.  It does what I want (generates a pdf file from the latex file file.tex), but then waits for user input.  These are the last lines of the program and I just want it to end without waiting for input.  How can I do this?</p>