[GRASS-dev] G__getenv return different results from ctypes and from GRASS modules

Glynn Clements glynn at gclements.plus.com
Fri May 31 17:48:39 PDT 2013

Nikos Alexandris wrote:

> > > Why the ctypes version return 'PERMANENT' instead of 'user1'?
> Glynn Clements wrote:
> > The $GISRC file is read the first time that an environment lookup is
> > made. There is no way to force it to be re-read.
> This means that I can't use instructions like


> in a function (pasted below) which I call from within a "for" loop to go 
> through Mapsets that potentially contain raster maps named differently? 

You can modify the current process' environment with G_setenv().

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list