title: Python Subprocess Error in using "cp"
body: <p>I was trying to use subprocess calls to perform a copy operation (code below):</p>
  
  <pre><code>import subprocess
  pr1 = subprocess.call(['cp','-r','./testdir1/*','./testdir2/'], shell = True)
  </code></pre>
  
  <p>and I got an error saying:</p>
  
  <pre><code>cp: missing file operand
  
  Try `cp --help' for more information.
  </code></pre>
  
  <p>When I try with <code>shell=False</code> , I get </p>
  
  <pre><code>cp: cannot stat `./testdir1/*': No such file or directory
  </code></pre>
  
  <p>How do I get around this problem?</p>
  
  <p>I'm using RedHat Linux GNOME Deskop version 2.16.0 and bash shell and Python 2.6</p>
  
  <p>P.S. I read the question posted in <a href="https://stackoverflow.com/questions/12267774/problems-with-issuing-cp-command-with-popen-in-python">Problems with issuing cp command with Popen in Python</a>, and it suggested using <code>shell = True</code> option, which is not working for me as I mentioned :(</p>