How to clear os.environ value for only one variable in Python
environment-variables, python
Solution
Use
os.environ.pop("PYTHONHOME")
See (minimal) documentation at http://docs.python.org/2/library/os.html
Problem
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.