GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
by GRASS Development Team (http://grass.osgeo.org)
The code in lib/python/ provides grass.script in order to support GRASS scripts written in Python. The scripts/ directory of GRASS 7 contains a series of examples actually provided to the end users.
See code in:
Table of content
The statement
imports core.py, db.py, raster.py and vector.py modules.
To import only selected module
Sample script (See the GRASS Wiki at http://grass.osgeo.org/wiki/GRASS_and_Python for more examples)
GRASS-oriented interface to subprocess module
Interface to g.message
These all run g.message, differing only in which flag (if any) is used. fatal() is error(), but also calls sys.exit(1).
Interface to g.parser
Interface to g.parser, intended to be run from the top-level, e.g.
Interface to g.tempfile
Returns the name of a temporary file, created with g.tempfile.
Key-value parsers
Interface to g.gisenv
Interface to g.region
Interface to g.findfile
Interface to g.list
Interface to g.mapsets
Interface to g.version
Color parsing
Check GRASS environment variables
Create new GRASS location
Various utilities, not specific to GRASS
Interface for db.*
modules.
Interface for r.*
modules.
Interface for v.*
modules.
Glynn Clements
Martin Landa <landa.martin gmail.com>