os.unsetenv(key)
Unset (delete) the environment variable named key. Such changes to the environment affect subprocesses started with os.system()
, popen()
or fork()
and execv()
.
When unsetenv()
is supported, deletion of items in os.environ
is automatically translated into a corresponding call to unsetenv()
; however, calls to unsetenv()
don’t update os.environ
, so it is actually preferable to delete items of os.environ
.
Availability: most flavors of Unix, Windows.
Please login to continue.