[GRASS-user] Re: Python scripting

Glynn Clements glynn at gclements.plus.com
Mon Feb 16 09:19:37 EST 2009


Georg Kaspar wrote:

> > It's part of the GRASS source code: lib/python/grass.py. It should get
> > installed into $GISBASE/etc/python during the build process, and Init.sh
> > should add that directory to PYTHONPATH.
> > 
> > Also, it's only present in 6.4, 6.5 and 7.0, not in earlier versions.
> 
> thanks. Since GRASS 6.3 integrates better with QGIS an R (at least on my 
> PC) I wonder if I can just copy the file and use it in 6.3!?

grass.py should only be needed for the Python scripts which are
included in 7.0, and the version of the wxPython GUI in 6.4 and 7.0
(6.3.0 pre-dates grass.py, so the wxPython GUI wasn't using it at that
point).

Some of the functions in grass.py depend upon features which have been
added since 6.3.0. If you have a Python script which needs grass.py,
it may also depend upon such features. Also, 6.3.0's Init.sh doesn't
set PYTHONPATH, so you will need to do that yourself.

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


More information about the grass-user mailing list