<s>[INST] How to set environment variables in Python I need to set some environment variables in the python script and I want all the other scripts that are called from python (shell scripts) which will be child process to see the environment variables set. The value is a number.
If I do os.environ["DEBUSSY"] = 1, it complains saying that 1 has to be string.
I also want to know how to read the environment variables in python (in the later part of the script) once I set it. 
 [/INST] Environment variables must be strings, so use
os.environ["DEBUSSY"] = "1"

to set the variable DEBUSSY to the string 1.  To access this variable later, simply use
print os.environ["DEBUSSY"]

Child processes automatically inherit the environment of the parent process -- no special action on your part is required.
 </s>