title: How to use the mv command in Python with subprocess
body: <p>I have a lot of files in /home/somedir/subdir/ and I'm trying to move them all up to /home/somedir programmatically.</p>
  
  <p>right now I have this:</p>
  
  <pre><code>subprocess.call(["mv", "/home/somedir/subdir/*", "somedir/"])
  </code></pre>
  
  <p>but it's giving me this error:</p>
  
  <pre><code>mv: cannot stat `/home/somedir/subdir/*': No such file or directory
  </code></pre>
  
  <p>I know that it does exist because when I type the mv command by hand using the exact same command as the script uses it works perfectly.</p>