I am having an issue with setting an environment variable on a call to subprocess.Popen. The environment variable does not seem to be getting set. Any suggestio
subprocess.Popen
For Python 3.5 and newer, you can use unpacking generalizations, eg:
env = { **os.environ, "TEST_VARIABLE": str(1234), } subprocess.Popen('/usr/bin/mybinary', env=env).wait()