I tried both
os.environ['TemporaryVar'] = "Apple"
and
os.putenv("TemporaryVar", "Apple")
but after running the python script, when i run the command env or set in the command line, i do not see variable as
TemporaryVar=Apple
I also have a sleep(50) in the python script so that the script does not terminate while i am checking for set or env in command line.
What i want is to write a python script that adds a variable to the environment variable. (I should be able to see it when i type env)