Using os module I can get the values of the environment variables. For example:
os
os.environ[\'HOME\']
However, I cannot set the
I am not sure. You can return the variable and set it that way. To do this print it.
(python program)
... print foo
(bash)
set -- $(python test.py) foo=$1