pygrass.modules package¶
Subpackages¶
- pygrass.modules.grid package
- pygrass.modules.interface package
- Submodules
- pygrass.modules.interface.docstring module
- pygrass.modules.interface.env module
- pygrass.modules.interface.flag module
- pygrass.modules.interface.module module
- pygrass.modules.interface.parameter module
- pygrass.modules.interface.read module
- pygrass.modules.interface.typedict module
- Module contents
Submodules¶
pygrass.modules.shortcuts module¶
-
class
pygrass.modules.shortcuts.
MetaModule
(prefix, cls=None)[source]¶ Bases:
object
Example how to use MetaModule
>>> g = MetaModule('g') >>> g_list = g.list >>> g_list.name 'g.list' >>> g_list.required ['type'] >>> g_list.inputs.type = 'raster' >>> g_list.inputs.mapset = 'PERMANENT' >>> g_list.stdout_ = -1 >>> g_list.run() Module('g.list') >>> g_list.outputs.stdout # doctest: +ELLIPSIS '...basin...elevation...'
>>> r = MetaModule('r') >>> what = r.what >>> what.description 'Queries raster maps on their category values and category labels.' >>> what.inputs.map = 'elevation' >>> what.inputs.coordinates = [640000,220500] # doctest: +SKIP >>> what.run() # doctest: +SKIP >>> v = MetaModule('v') >>> v.import # doctest: +ELLIPSIS File "<doctest grass.pygrass.modules.shortcuts.MetaModule[16]>", line 1 v.import ^ SyntaxError: invalid syntax >>> v.import_ Module('v.import')