Modifying environment variables

Terry Hancock hancock at anansispaceworks.com
Mon Dec 24 23:58:33 CET 2001


Thanks for the two answers below!

>> ~How to set an environment variable in a shell, using
>> ~a Python script.

Emile van Sebille:
> set X=`python -c"print 'hello'"`

Martin von Loewis: 
> Print a shell command on standard output, then, in the
> shell, do 
> eval `script_name`

That'll make my problem a lot simpler.

Terry

-- 
------------------------------------------------------
Terry Hancock
hancock at anansispaceworks.com       
Anansi Spaceworks                 
http://www.anansispaceworks.com 
P.O. Box 60583                     
Pasadena, CA 91116-6583
------------------------------------------------------




More information about the Python-list mailing list