title: how to open a cmd shell in windows and issue commands to that shell using python
body: <p>I've tried</p>
  
  <pre><code>import os
  os.system('cmd.exe')
  </code></pre>
  
  <p>great it opens up a cmd shell</p>
  
  <p>but how do I write commands from my python script so that the opened shell executes it?</p>
  
  <p>basically it's like this</p>
  
  <p>open up a cmd shell and somehow get a hold of the instance of the opened shell and issue commands to it. the subprocess module doesn't seem to open a cmd shell im not trying to view the contents of the shell via the interpreter but actually
  but that's what subprocess does?</p>
  
  <p>so how can we open up a cmd shell and pass commands to that opened shell?</p>