Set Windows Environment Variable

Duncan Booth duncan.booth at invalid.invalid
Thu Mar 30 08:16:25 EST 2006


Fuzzyman wrote:

> Hello all,
> 
> I would like to set a Windows Environment variable for another
> (non-child) process.
> 
> This means that the following *doesn't* work : ::
> 
>     os.environ['NAME'] = value
> 
> In the ``win32api`` package there is a ``GetEnvironmentVariable``
> function, but no ``SetEnvironmentVariable``. Any options ?

No, your only option is to find a solution which doesn't involve changing 
another process's environment.



More information about the Python-list mailing list