[GRASS-dev] Handling of Python scripts on MS Windows

Glynn Clements glynn at gclements.plus.com
Wed Apr 9 08:40:37 PDT 2014


Markus Metz wrote:

> > I basically agree with user expectations you stated. But I would like to
> > note that recently, I met several users which wanted and expected that GRASS
> > script will run outside GRASS without any special environment setup in the
> > script itself.
> 
> AFAIK, GRASS scripts explicitly test if they are run inside GRASS,
> otherwise they exit with an error message saying "You must be in GRASS
> GIS to run this program." You are inside GRASS as soon as the
> environment variables for the GRASS version are set and as soon as a
> proper GRASS session has been established (location and mapset). No
> GRASS script should run outside GRASS, independent of the OS.

This is conflating "inside GRASS" with "necessary environment
variables set".

It's entirely possible to configure the system so that the environment
variables are always set.

As I've mentioned before, the only time I run the grass7 script is if
I'm testing it.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list