Interface for modifying Windows environment variables from Python

后端 未结 6 1929
无人共我
无人共我 2020-12-08 05:01

How can I persistently modify the Windows environment variables from a Python script? (it\'s the setup.py script)

I\'m looking for a standard function or module to u

6条回答
  •  感情败类
    2020-12-08 06:01

    The registry way is if you want to modify it permanently for everything, which I guess is what you want here since it's in setup.py.

    Temporarily for just your process, then os.environ is the trick.

提交回复
热议问题