[GRASS-dev] Re: [GRASS-user] How to embed a grass script (for example v.db.addcol) into a Pythonscript on windows?

Glynn Clements glynn at gclements.plus.com
Thu Mar 4 16:48:49 EST 2010


Michael Barton wrote:

> This implies that it is now possible to create python scripts that run in GRASS under windows??? 
> 
> That would be great news. Is there anything special that is needed for this to work?

1. The Python interpreter (python.exe) needs to be in the PATH
2. Python needs to be associated with the .py extension
3. PATHEXT needs to include .py if you want to be able to omit the extension
4. PYTHONPATH needs to be set to %WINGISBASE%\etc\python

1-3 should be taken care of by the Python installer. 4 needs to be
done by the startup (currently, this doesn't appear to be the case on
Windows).

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


More information about the grass-dev mailing list