import subprocess
proc = subprocess.Popen('cmd.exe', stdin=subprocess.PIPE, stdout=subprocess
    .PIPE)
stdout, stderr = proc.communicate('dir c:\\')
How to execute a command prompt command from python