title: How to execute a command prompt command from python
body: <p>I tried something like this, but with no effect:</p>
  
  <pre><code>command = "cmd.exe"
  proc = subprocess.Popen(command, stdin = subprocess.PIPE, stdout = subprocess.PIPE)
  proc.stdin.write("dir c:\\")
  </code></pre>