system calls to sh

Alex alex at somewhere.round.here
Fri Mar 17 22:11:13 CET 2000


> Look at os.environ if you want to affect the environment of the
> current process.

I tried that, but I didn't have much success in unsetting a variable:

>>> os.environ['MY_VAR'] = 'whatever'
>>> os.system ('echo $MY_VAR')
whatever
0
>>> del os.environ['MY_VAR']
>>> os.system ('echo $MY_VAR')
whatever
0

Alex.



More information about the Python-list mailing list