win32api.SetEnvironmentVariableW
SetEnvironmentVariableW(Name, Value)
Creates, deletes, or changes the value of an environment variable.
Parameters
Name : str
Name of the environment variableValue : str
Value to be set, or None to remove variableWin32 API References
Search for SetEnvironmentVariable at msdn, google or google groups.