title: python subprocess.Popen error in linux
body: <p>I am now using Python to run a command-line executable program that was developed by myself:</p>
  
  <pre><code>import subprocess
  cmd = '../../run_demo'
  print cmd
  subprocess.Popen(cmd)
  </code></pre>
  
  <p>This script runs very well in windows. However, it runs on linux, the following errors are given:</p>
  
  <pre><code>Traceback:
    File "script.py", line 6, in &lt;module&gt;
       subprocess.Popen(cmd)
    File "/user/lib/python2.5/subprocess.py", line 623, in _init_
       erread, errwrite)
    File "/user/lib/python2.6/subprocess.py", line 1141, in _execute_child
       raise child_exception
    OSError: [Errno 2] No such file or directory
  </code></pre>
  
  <p>As the executable command is printed in the script <code>print cmd</code>, if I copy the content of <code>cmd</code>, and then run in the command line, then the executable program can run.  Any ideas? Thanks. </p>