title: Python subprocess, subshells, and redirection
body: <p>I want to use the magic of subshells and redirection with the python subprocess module, but it doesn't seem to work, complaining about unexpected tokens are the parenthesis.  For example, the command</p>
  
  <p><code>cat &lt;(head tmp)</code></p>
  
  <p>when passed to subprocess gives this</p>
  
  <pre><code>&gt;&gt;&gt; subprocess.Popen("cat &lt;(head tmp)", shell=True)
  &lt;subprocess.Popen object at 0x2b9bfef30350&gt;
  &gt;&gt;&gt; /bin/sh: -c: line 0: syntax error near unexpected token `('
  /bin/sh: -c: line 0: `cat &lt;(head tmp)'
  </code></pre>