On 11/10/2016 05:32 PM, Thorsten Kampe wrote: > Yes. That works. But it's not like subprocess should work. > It certainly is odd. I can at least confirm that when I try to run your code I get the error that you're expecting, but I run debian. Have you tried using os.unsetenv()? https://docs.python.org/2/library/os.html#os.unsetenv Cheers, Thomas