title: Command prompt closes after I run my.exe from python script
body: <pre><code>import sys
  import subprocess
  import os
  
  os.chdir(&quot;C:\\code\\runcommand\\&quot;)
  command = &quot;my.exe&quot;
  subprocess.Popen(command)
  </code></pre>
  <p>with above code my.exe runs on command prompt and gets closed. How to prevent command prompt from closing.</p>