python: use os.environ[] instead of os.putenv()