views:

154

answers:

1

if I paste this into the command prompt by hand, it works, but if I run it from python, I get The filename, directgory name, or volume label syntax is incorrect.

os.system('%comspec% /k ""C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86')
os.system('devenv Immersica.sln /rebuild Debug /Out last-build.txt')
+1  A: 

I think the backslashes are messing you up. You need to use an R string (raw)

r"string"

See http://www.python.org/doc/2.5.2/ref/strings.html for reference

Georg Zimmer
how about an up vote, since i answered the question :)
Georg Zimmer