Helper method for passing environment variables to the subprocess.

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