Modifying environment variables

Terry Hancock hancock at
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 Hancock
hancock at       
Anansi Spaceworks         
P.O. Box 60583                     
Pasadena, CA 91116-6583

More information about the Python-list mailing list