set environmental variable from python

Artur Bercik vbubbly21 at
Fri Oct 31 02:22:45 CET 2014

I have to set environmental variable in my windows PC as follows:

variable name: GISBASE

value: C:\GRASS-64

Is it possible to set it from python?

import sys


But how to give variable name? I have to set both the variable name and

Thanks in the advance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list