I believe that running an external command with a slightly modified environment is a very common case. That\'s how I tend to do it:
import subprocess, os my_
The env parameter accepts a dictionary. You can simply take os.environ, add a key (your desired variable) (to a copy of the dict if you must) to that and use it as a parameter to Popen.
Popen