Adding environment variables to bash.

Fredrik Lundh fredrik at pythonware.com
Thu Sep 11 05:08:50 EDT 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.

</F>




More information about the Python-list mailing list