title: Why cannot pass arguments with subprocess.PIPE in python?
body: <p>I'm trying to do something really easy in order to learn how to use <code>subprocess</code> in python</p>
  
  <p>What I'm trying is this:</p>
  
  <pre><code>ll | egrep "*gz"
  </code></pre>
  
  <p>so after read the manual of python (which I didn't understand very well), I tried this:</p>
  
  <pre><code>lista = subprocess.Popen(['ls', '-alF'], stdout=subprocess.PIPE)
  filtro = subprocess.Popen(['egrep', '"*gz"'], stdin=lista.stdout, stdout=subprocess.PIPE)
  filtro.communicate()[0]
  </code></pre>
  
  <p>But all I get is <code>''</code> and I don't really know how to do this, I've read <a href="https://stackoverflow.com/questions/9655841/python-subprocess-how-to-use-pipes-thrice">this</a> but it seems I didn't get it at all... could somebody explain to me how this works in order to use it after with other commands??</p>
  
  <p>Thanks in advance!!</p>