# grass.pygrass.modules package

## Subpackages

- grass.pygrass.modules.grid package
  - Submodules
  - grass.pygrass.modules.grid.grid module
  - grass.pygrass.modules.grid.patch module
  - grass.pygrass.modules.grid.split module
- grass.pygrass.modules.interface package
  - Submodules
  - grass.pygrass.modules.interface.docstring module
  - grass.pygrass.modules.interface.env module
  - grass.pygrass.modules.interface.flag module
  - grass.pygrass.modules.interface.module module
  - grass.pygrass.modules.interface.parameter module
  - grass.pygrass.modules.interface.read module
  - grass.pygrass.modules.interface.typedict module

## Submodules

## grass.pygrass.modules.shortcuts module

class `grass.pygrass.modules.shortcuts.``MetaModule`(prefix, cls=None)

  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
      '...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]
      >>> what.run()
      >>> v = MetaModule('v')
      >>> v.import
        File "<doctest grass.pygrass.modules.shortcuts.MetaModule[16]>", line 1
         v.import
              ^
      SyntaxError: invalid syntax
      >>> v.import_
      Module('v.import')

Help Index | Topics Index | Keywords Index | Full Index

© 2003-2024 GRASS Development Team, GRASS GIS 8.2.2dev Reference Manual