I am running visual studio, and to run the program I usually just hit ctrl+F5.
Now I am trying to write a python script to run this program with several different configurations.
So far I have something like
cmd = "mycmd.exe arg1 arg2"
os.system(cmd)
but this fails with a message ERROR: environment variable TZ not set correctly.
I checked in visual studio and in the property windows, under config in the debuggin tab there is a setting for the TZ variable,
Enviroment TZ=XXX
How can I tell python to use the same setting when running the program?
Is os.system the best solution to run this or are there better alternatives?
Thanks!
Python will call the underlaying os.putenv() method under the hood automatically
http://docs.python.org/library/os.html#os.putenv