title: Running an external program (executable) with parameters in python
body: <p>I am trying to automate a command line program.</p>
  
  <p>The <code>exe</code> file takes one argument to run. For example:</p>
  
  <p><code>ztac.exe &lt;mode&gt;</code>
  (where mode options are <code>safe</code>, <code>normal</code> or <code>debug</code>).</p>
  
  <p>To run in debug mode I simply type this in the command line:</p>
  
  <p><code>C:\source&gt;ztac debug</code></p>
  
  <p>How do I write a Python program to run this <code>ztac.exe</code> file while taking the different modes as inputs?</p>