Environment Variable

Vivek Chaudhary vivek7006 at yahoo.com
Mon Jul 11 21:53:06 CEST 2005

Is it possible to set an environment variable in python script whose
value is retained even after the script exits.

Doing the following creates an environment variable "name" which is
visible to only subprocesses created by os.system() and os.popen(). 

os.putvar("name", "vivek")

Is it possible to somehow create this environment variable inside
python script which will be avaibale even after the script exits. In
otherwords, after I run my script, if I do a "echo $name" in my shell,
it should return the value "vivek"

More information about the Python-list mailing list