def set_environ(inherit=True, append={}):
_environ = {} if not inherit else environ<EOL>for k,v in append.iteritems():<EOL><INDENT>_environ[k] = v<EOL><DEDENT>return _environ<EOL>
Helper method for passing environment variables to the subprocess.