Interface for modifying Windows environment variables from Python

后端 未结 6 1955
无人共我
无人共我 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 05:42

    In the os module, there is getenv and putenv functions. However, it seems that the putenv is not working correctly and that you must use the windows registry instead

    Look at this discussion

提交回复
热议问题