title: Using greater than operator with subprocess.call
body: <p>What I am trying to do is pretty simple. I want to call the following command using python's <code>subprocess</code> module.</p>
  
  <pre><code>cat /path/to/file_A &gt; file_B
  </code></pre>
  
  <p>The command simply works and copies the contents of <code>file_A</code> to <code>file_B</code> in current working directory. However when I try to call this command using the <code>subprocess</code> module in a script it errors out. Following is what I am doing:</p>
  
  <pre><code>import subprocess
  
  subprocess.call(["cat", "/path/to/file_A", "&gt;", "file_B"])
  </code></pre>
  
  <p>and I get the following error:</p>
  
  <pre><code>cat: /path/to/file_A: No such file or directory
  cat: &gt;: No such file or directory
  cat: file_B: No such file or directory
  </code></pre>
  
  <p>what am I doing wrong ? How can I use the greater than operator with subprocess modules <code>call</code> command ?</p>