title: How to start external program from Python script in the foreground?
body: <pre><code>import os
  os.system("notepad macros.txt")
  </code></pre>
  
  <p>or </p>
  
  <pre><code>from subprocess import Popen
  Popen(["notepad", "macros.txt"])
  </code></pre>
  
  <p>both start notepad in the background. How to start it in the foreground?</p>