title: Python subprocess.Popen in other directory
body: <p>I have this command:</p>
  
  <pre><code>grep = subprocess.Popen('head -20'.split(), stdin=subprocess.PIPE, stdout=subprocess.PIPE)
  ls = subprocess.Popen('ls'.split(), stdout=grep.stdin)
  output_lines = grep.communicate()[0]
  </code></pre>
  
  <p>How can I run this command in other directory? For example in /home/?</p>