4 @brief Complex list for menu entries for wxGUI
11 python menudata.py [action] [manager|modeler]
20 (C) 2007-2011 by the GRASS Development Team
22 This program is free software under the GNU General Public License
23 (>=v2). Read the file COPYING that comes with GRASS for details.
25 @author Michael Barton (Arizona State University)
26 @author Yann Chemin <yann.chemin gmail.com>
27 @author Martin Landa <landa.martin gmail.com>
28 @author Glynn Clements
29 @author Anna Kratochvilova <kratochanna gmail.com>
41 gisbase = os.getenv(
'GISBASE')
42 filename = os.path.join(ETCWXDIR,
'xml',
'menudata.xml')
44 MenuData.__init__(self, filename)
47 """!Create dictionary of modules used to search module by
48 keywords, description, etc."""
51 for node
in self.tree.getiterator():
52 if node.tag ==
'menuitem':
53 module = description =
''
55 for child
in node.getchildren():
56 if child.tag ==
'help':
57 description = child.text
58 if child.tag ==
'command':
60 if child.tag ==
'keywords':
62 keywords = child.text.split(
',')
65 modules[module] = {
'desc': description,
66 'keywords' : keywords }
68 print >> sys.stderr,
"WARNING: Module <%s> has no keywords" % module
Global variables used by wxGUI.