|
GRASS Programmer's Manual
6.5.svn(2012)-r51648
|
Data Structures | |
| class | grassTask |
| This class holds the structures needed for filling by the parser. More... | |
| class | processTask |
| A ElementTree handler for the --interface-description output, as defined in grass-interface.dtd. More... | |
Functions | |
| def | get_interface_description |
| Returns the XML description for the GRASS cmd. | |
| def | parse_interface |
| Parse interface of given GRASS module. | |
| def | command_info |
| Returns meta information for any GRASS command as dictionary with entries for description, keywords, usage, flags, and parameters, e.g. | |
| def python.task.command_info | ( | cmd | ) |
Returns meta information for any GRASS command as dictionary with entries for description, keywords, usage, flags, and parameters, e.g.
>>> gtask.command_info('g.tempfile') {'keywords': ['general', 'map management'], 'params': [{'gisprompt': False, 'multiple': False, 'name': 'pid', 'guidependency': '', 'default': '', 'age': None, 'required': True, 'value': '', 'label': '', 'guisection': '', 'key_desc': [], 'values': [], 'values_desc': [], 'prompt': None, 'hidden': False, 'element': None, 'type': 'integer', 'description': 'Process id to use when naming the tempfile'}], 'flags': [{'description': 'Verbose module output', 'value': False, 'label': '', 'guisection': '', 'suppress_required': False, 'hidden': False, 'name': 'verbose'}, {'description': 'Quiet module output', 'value': False, 'label': '', 'guisection': '', 'suppress_required': False, 'hidden': False, 'name': 'quiet'}], 'description': 'Creates a temporary file and prints the file name.', 'usage': 'g.tempfile pid=integer [--verbose] [--quiet]' } >>> gtask.command_info('v.buffer')['keywords'] ['vector', 'geometry', 'buffer']
Definition at line 470 of file task.py.
References python.task.parse_interface().
| def python.task.get_interface_description | ( | cmd | ) |
Returns the XML description for the GRASS cmd.
The DTD must be located in $GISBASE/etc/grass-interface.dtd, otherwise the parser will not succeed.
| cmd | command (name of GRASS module) |
Definition at line 425 of file task.py.
References python.core.decode().
Referenced by python.task.parse_interface().
| def python.task.parse_interface | ( | name, | |
parser = processTask, |
|||
blackList = None |
|||
| ) |
Parse interface of given GRASS module.
| name | name of GRASS module to be parsed |
Definition at line 455 of file task.py.
References python.core.decode(), python.task.get_interface_description(), and python.core.parser().
Referenced by python.task.command_info().