[GRASS-dev] Handling of Python scripts on MS Windows
Markus Metz
markus.metz.giswork at gmail.com
Tue Apr 8 23:00:52 PDT 2014
On Tue, Apr 8, 2014 at 11:23 PM, Vaclav Petras <wenzeslaus at gmail.com> wrote:
>
> On Tue, Apr 8, 2014 at 3:22 PM, Markus Metz <markus.metz.giswork at gmail.com>
> wrote:
>>
>> IMHO, what you say is that GRASS and MS Windows are incompatible by
>> principle, and you will not succeed in making MS Windows compatible
>> with these GRASS principles. I assume WinGRASS users expect a typical
>> MS Windows software like clicking on the GRASS icon which executes a
>> command (grassXY) and starts the software. I strongly suggest to
>> respect the users' expectations. It does not matter in this respect if
>> the command actually only sets the environment for GRASS modules and
>> if this environment is like a sandbox or system-wide. FWIW, Linux
>> users also execute a grassxy command to start GRASS.
>
>
> 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.
Markus M
> Perhaps, ArcGIS sets the environment, so this might be the
> reason they expect the same from GRASS. I wonder if we can make setting the
> environment in Python easier.
>
> Vaclav
More information about the grass-dev
mailing list