title: invoking pipe command with Popen in Python
body: <p>What is the correct way to invoke a command containing multiple pipes to <code>Popen</code> so that its output can be read? I tried:</p>
  
  <p><code>Popen(shlex.split("mycmd arg1 | mysecondcmd - | thirdcmd -", stdout=PIPE)")</code></p>
  
  <p>But I don't believe <code>shlex.split</code> is right here. What's the correct syntax?</p>