Wednesday, July 18, 2018

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.

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...