While trying to automate a process I need to run C:\"Program Files\Microsoft Visual Studio 10.0"\VC\bin\vcvars32.bat using the Python script. I tried it as below
p= subprocess.Popen('C:\\"Program Files\\Microsoft Visual Studio 10.0"\\VC\\bin\\vcvars32.bat', shell=True,stdin=sub.PIPE,stdout=sub.PIPE, stderr=sub.STDOUT,)
but it throws an error as below:
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
ERROR: Cannot determine the location of the VS Common Tools folder.
while on the contrary If I run the same command manually at the command prompt, it is a success.