I have a python script that will run a batch script. This batch script sets an environment variable say _BLDPATH. I want to grab this variable in the python script to use that variable later on. The problem is that even though the variable gets set properly when the batch file was executed, the os.getenv does not get me the variable back in python script.
How do I get this to work.
snippet of the code is
bldpath = os.getenv("_BLDPATH")
print "bld path is ",bldpath
snippet of bldroot.bat
if "%_BLDPATH%" == "" goto SET_BLDPATH
The result when I run the above python script is
bld path is None