python, shell, environment variable
oliver
fwang2 at yahoo.com
Tue Jun 11 02:19:29 EDT 2002
hi, folks,
I am trying to get a set of python and bash scripts to work, and I
constantly run into trouble with environment variables:
First, my python script need to modify environment variable, say,
PATH, and want to keep the modification even after the script is done.
os.environ["PATH"]= ... doesn't seem to work, any idea?
Second, it would be better if my python script can call bash shell and
still keep the environment variable modification done by bash. I tried
os.popen("source some_shell"), it doesn't work. ?
Thanks for help.
-oliver
More information about the Python-list
mailing list