T
tuxlover
Is it possible to set an environment variable from inside the python
script which will be retained after the script exits.
If I use the following code:
import os
os.putvar("name", "tuxlover")
the enivironment variable name is visible to only the sub-process
created by os.system and os.popen. But as soon as the python script
vanishes, the environment variable "name" is gone.
What I am wondering is that is it possible to set a environment
variable from inside a python script, and then access it (say, echo
$name from the shell) after the python script exits.
Thanks
Tuxlover
script which will be retained after the script exits.
If I use the following code:
import os
os.putvar("name", "tuxlover")
the enivironment variable name is visible to only the sub-process
created by os.system and os.popen. But as soon as the python script
vanishes, the environment variable "name" is gone.
What I am wondering is that is it possible to set a environment
variable from inside a python script, and then access it (say, echo
$name from the shell) after the python script exits.
Thanks
Tuxlover