title: Help with wrapping a command line tool in Python
body: <p>I'm really stuck with a problem I'm hoping someone can help me with. I'm trying to create a wrapper in Python3.1 for a command line program called <code>spooky</code>. I can successfully run this program on the command line like this:</p>
  
  <pre><code>$ spooky -a 4 -b .97
  </code></pre>
  
  <p>My first Python wrapper attempt for spooky looked like this:</p>
  
  <pre><code>import subprocess
  
  start = "4"
  end = ".97"
  
  spooky_path = '/Users/path/to/spooky'
  cmd = [spooky_path, '-a', start, '-b', end]
  process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
  process.wait()
  print('Done')
  </code></pre>
  
  <p>The above code prints <code>Done</code>, but does not execute the program <code>spooky</code></p>
  
  <p>Next I tried to just execute the program on the command line like this:</p>
  
  <pre><code>$ /Users/path/to/spooky -a 4 -b .97
  </code></pre>
  
  <p>The above code also fails, and provides no helpful errors.</p>
  
  <p>My question is: How can I get Python to run this program by sending <code>spooky -a 4 -b .97</code> to the command line? I would VERY much appreciate any help you can provide. Thanks in advance.</p>