title: Python Run System Command and Save Output
body: <p>1) Write a python program that runs a system command (i.e. "dir" )
  2) Save the output of the system command into a variable
  3) Print the variable</p>
  
  <p>This is done in Python, I can't figure this out, I found one that only returned me "0" using subprocess.</p>
  
  <p>I'm using Wndows 7 Python 2.5 and 2.7</p>
  
  <p>Basically, I want the output of something like cmd -> dir C:\</p>
  
  <p>Then that output gets saved to a file using Python.</p>
  
  <p>Help would be nice, </p>