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.
Use
os.environ.pop("PYTHONHOME")
See (minimal) documentation at http://docs.python.org/2/library/os.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With