In a 64-bit system with 32 bit python 2.7 installed I am trying to do the following:
import subprocess
p = subprocess.call(\'dir\', shell=True)
print p
In case anyone else besides me doesn't see this in the (3.4) docs right away:
On Windows with shell=True, the COMSPEC environment variable specifies the default shell. The only time you need to specify shell=True on Windows is when the command you wish to execute is built into the shell (e.g. dir or copy). You do not need shell=True to run a batch file or console-based executable.
Note Read the Security Considerations section before using shell=True.