title: Python: How to execute external program with parameters from another file?
body: <p>I am trying to write a python script to execute a command line program with parameters imported from another file.  The command line interface for the program works as follows:
  ./executable.x parameter(a) parameter(b) parameter(c) ...  </p>
  
  <p>My code is:</p>
  
  <pre><code>#program to pass parameters to softsusy
  import subprocess
  #open parameter file
  f = open('test.dat', 'r')
  program = './executable.x'
  #select line from file and pass to program
  for line in f:
      subprocess.Popen([program, line])
  </code></pre>
  
  <p>The test.dat file looks like this:</p>
  
  <pre><code>param(a) param(b) param(c)...
  </code></pre>
  
  <p>The script calls the program however it does not pass the variables.  What am I missing?</p>