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
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
Duncan Booth wrote:
Fuzzyman wrote:
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.
Surely there must be a
Magnus Lycka wrote:
Duncan Booth wrote:
Fuzzyman wrote:
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
Fuzzyman wrote:
Magnus Lycka wrote:
Surely there must be a way to programatically set up the
environment variables for not yet started processes? I.e.
doing the same as when you manually change things in the
control panel. I'm pretty sure many Windows installers do
that, and while I
Fuzzyman wrote:
I *believe* that ``SetEnvironmentVariable`` exists in the underlying
windows API, but that it isn't wrapped by the win32api extension.
SetEnvironmentVariable does the same thing as assignment to os.environ.
The only way to set the environment for another process is to create
Fredrik Lundh wrote:
Fuzzyman wrote:
I *believe* that ``SetEnvironmentVariable`` exists in the underlying
windows API, but that it isn't wrapped by the win32api extension.
SetEnvironmentVariable does the same thing as assignment to os.environ.
The only way to set the environment for