title: Why does subprocess.Popen not work
body: <p>I tried a lot of things but for some reason I could not get things working. I am trying to run dumpbin utility of MS VS using a Python script.</p>
  
  <p>Here are what I tried (and what did not work for me)</p>
  
  <p>1.</p>
  
  <pre><code>tempFile = open('C:\\Windows\\temp\\tempExports.txt', 'w')
  command = '"C:/Program Files/Microsoft Visual Studio 8/VC/bin/dumpbin" /EXPORTS ' + dllFilePath
  process = subprocess.Popen(command, stdout=tempFile)
  process.wait()
  tempFile.close()
  </code></pre>
  
  <p>2.</p>
  
  <pre><code>tempFile = open('C:\\Windows\\temp\\tempExports.txt', 'w')
  command = 'C:/Program Files/Microsoft Visual Studio 8/VC/bin/dumpbin /EXPORTS ' + dllFilePath
  process = subprocess.Popen(command, stdout=tempFile)
  process.wait()
  tempFile.close()
  </code></pre>
  
  <p>3.</p>
  
  <pre><code>tempFile = open('C:\\Windows\\temp\\tempExports.txt', 'w')
  process = subprocess.Popen(['C:\\Program Files\\Microsoft Visual Studio 8\\VC\\bin\\dumpbin', '/EXPORTS', dllFilePath], stdout = tempFile)
  process.wait()
  tempFile.close()
  </code></pre>
  
  <p>does anyone have any idea on doing what i am trying to do (<code>dumpbin /EXPORTS C:\Windows\system32\kernel32.dll &gt; tempfile.txt</code>) correctly in Python?</p>