title: error in subprocess.Popen vs os.system
body: <p>I am trying to use subprocess.Popen rather than os.system, but am having a problem.  This seems so simple, that I am probably missing something obvious.  I am trying to call and run a script I have previously programmed in Octave (the Octave code works fine, and i do not want to have to spend the time to re-write this in NumPy, etc.).  I also do not want to keep Octave installed on this particular machine permanently.</p>
  
  <p>This code works perfectly:</p>
  
  <pre><code>os.system('sudo apt-get install octave')
  os.system('octave Documents/small_eig.m')
  os.system('sudo apt-get remove octave')
  </code></pre>
  
  <p>This code, however:</p>
  
  <pre><code>subprocess.Popen('sudo apt-get install octave')
  subprocess.Popen('octave Documents/small_eig.m')
  subprocess.Popen('sudo apt-get remove octave')
  </code></pre>
  
  <p>Generates the following message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "Documents/ben.py", line 11, in &lt;module&gt;
      subprocess.Popen('sudo apt-get install octave')
    File "/usr/lib/python2.7/subprocess.py", line 709, in __init__
      errread, errwrite)
    File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
       raise child_exception
  OSError: [Errno 2] No such file or directory
  </code></pre>
  
  <p>Any thoughts?</p>
  
  <p>Thanks,</p>