Sunday, 11 August 2013

How to clear os.environ value for only one Variable in Python

How to clear os.environ value for only one Variable in Python

I'm setting os.environ['PYTHONHOME']="/home/user/OpenPrint/py2.6" in my
python script
But at the end of the script I need to clear this variable so that I can
call another python script from a different location. Can someone tell me
how to do that? I tried os.environ.clear() but that clears all the other
variables too.

No comments:

Post a Comment