title: Invoke make from different directory with python script
body: <p>I need to invoke make (build a makefile) in a directory different from the one I'm in, from inside a Python script. If I simply do:</p>
  
  <pre><code>build_ret = subprocess.Popen("../dir1/dir2/dir3/make",
                       shell = True, stdout = subprocess.PIPE)
  </code></pre>
  
  <p>I get the following:
  /bin/sh: ../dir1/dir2/dir3/make: No such file or directory</p>
  
  <p>I've tried:</p>
  
  <pre><code>build_ret = subprocess.Popen("(cd ../dir1/dir2/dir3/; make)",
                       shell = True, stdout = subprocess.PIPE)
  </code></pre>
  
  <p>but the make command is ignored. I don't even get the "Nothing to build for" message. </p>
  
  <p>I've also tried using "communicate" but without success. This is running on Red Hat Linux.</p>