Adding environment variables to bash.

Fredrik Lundh fredrik at
Thu Sep 11 11:08:50 CEST 2008

aditya shukla wrote:

> Can i add any environment variable to bash from my python script? so 
> that when i use env command then i can see that environment variable.

not if you run the script from the shell.

when a process starts, it gets a *copy* of the parent's environment.  it 
can modify that copy, but it cannot modify the variables in the parent.


More information about the Python-list mailing list