[Tutor] How to change Windows Environment Variable

dman dsh8290@rit.edu
Thu, 30 Aug 2001 20:17:15 -0400

When you ask a new question, just start a new mail, don't reply to a
totally unrelated post.

On Fri, Aug 31, 2001 at 08:43:12AM +0900, ??? wrote:
| Dear all,
| How to change environment variable on Windows NT or 2000 by python?

>>> import os
>>> print os.putenv.__doc__
putenv(key, value) -> None
Change or add an environment variable.

You want os.putenv.

Note that it only affects the python process, not any parent processes
(ie a shell).