title: Starting an external program in Python and returning immediately
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2602052/how-to-call-a-program-from-python-without-waiting-for-it-to-return">how to call a program from python without waiting for it to return</a>  </p>
  </blockquote>
  
  
  
  <p>I'm writing a PyQt program that needs to start an external Windows executable. At that point the Python program should continue to run, never needing any contact with the exe file it started.</p>
  
  <p>I have tried several variations such as:</p>
  
  <pre><code>process = subprocess.Popen(["vncviewer.exe"]); process.communicate()
  subprocess.call("vncviewer.exe")
  os.system("vncviewer.exe")
  os.system("vncviewer.exe&amp;")
  os.system("start vncviewer.exe")
  </code></pre>
  
  <p>etc.</p>
  
  <p>Using most any strategy, I can run the program successfully, but the Python script is then blocked until the program completes. The GUI is frozen and unusable. </p>
  
  <p>How can I have Python start a completely separate and unrelated task, and then continue to run so that I can open other programs, and even end the Python script without affecting the programs it started?</p>