It's already possible to do it via simply modifying os.environ before running the script and then restoring it but it would be nice if script_runner.run(...) had a parameter for that. Actually run_subprocess already does: env argument will be just passed to subprocess.Popen so we just need to implement it for run_inprocess.
It's already possible to do it via simply modifying
os.environ
before running the script and then restoring it but it would be nice ifscript_runner.run(...)
had a parameter for that. Actuallyrun_subprocess
already does:env
argument will be just passed tosubprocess.Popen
so we just need to implement it forrun_inprocess
.