This may help: http://stackoverflow.com/questions/488449/can-a-python-script-persistently-change-a-windows-environment-variable-elegantl
The answer with the use of the setx.exe program looks interesting. If windows has a program to modify environment variables from the command line, a python script can easily call this program with the subprocess module.
Another direction is to use ironpython instead of python, and .net tools.