title: Python subprocess Popen not sending all arguments to shell
body: <p>I am using Python's subprocess module to launch another program. The program requires an argument '-c{0-7}'.</p>
  
  <pre><code>this_dir = os.path.dirname(os.path.abspath(__file__))
  cmd = [os.path.join(this_dir,'foobar'),'-c%d' % channel]
  print "Starting process: %s" % str(cmd)
  Proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,shell=True)
  </code></pre>
  
  <p>In the C++ program, I'm checking the arguments passed in:</p>
  
  <pre><code>for (int i = 0; i &lt; argc; i++)
  {   
      cerr &lt;&lt; i &lt;&lt; "   " &lt;&lt; argv[i] &lt;&lt; endl;
  }   
  cerr &lt;&lt; "" &lt;&lt; endl;
  </code></pre>
  
  <p>Here is the output when I run the python script:</p>
  
  <pre><code>user@home:~/embedded_pqa/saleae$ ./foobar.py -c3
  Starting process: ['/home/user/code/foobar', '-c3']
  0   /home/user/code/foobar
  </code></pre>
  
  <p>As is clear, the argument '-c3' is not being passed to the subprocess. Any thoughts?</p>