[GRASS-SVN] r37619 -
grass/branches/releasebranch_6_4/gui/wxpython/support
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 30 11:30:25 EDT 2009
Author: martinl
Date: 2009-05-30 11:30:25 -0400 (Sat, 30 May 2009)
New Revision: 37619
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/support/update_menudata.py
Log:
message cosmetics
Modified: grass/branches/releasebranch_6_4/gui/wxpython/support/update_menudata.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/support/update_menudata.py 2009-05-30 15:23:31 UTC (rev 37618)
+++ grass/branches/releasebranch_6_4/gui/wxpython/support/update_menudata.py 2009-05-30 15:30:25 UTC (rev 37619)
@@ -30,6 +30,8 @@
HandlerBase=xml.sax.handler.ContentHandler
from xml.sax import make_parser
+from grass.script import core as grass
+
def ParseInterface(cmd):
"""!Parse interface
@@ -47,26 +49,29 @@
return grass_task
-
def parseModules():
"""!Parse modules' interface"""
modules = dict()
# list of modules to be ignored
- ignore = [ 'mkftcap' ]
+ ignore = [ 'mkftcap',
+ 'g.parser',
+ 'r.mapcalc',
+ 'r3.mapcalc',
+ 'vcolors' ]
count = len(globalvar.grassCmd['all'])
i = 0
for module in globalvar.grassCmd['all']:
i += 1
if i % 10 == 0:
- print ' %d/%d' % (i, count)
+ grass.info('* %d/%d' % (i, count))
if module in ignore:
continue
try:
interface = ParseInterface(cmd = [module])
except IOError, e:
- print >> sys.stderr, e
+ grass.error(e)
continue
modules[interface.name] = { 'label' : interface.label,
'desc' : interface.description }
@@ -88,7 +93,7 @@
module = item['command'].split(' ')[0]
if not modules.has_key(module):
- print 'WARNING: \'%s\' not found in modules' % item['command']
+ grass.warning("'%s' not found in modules" % item['command'])
continue
if modules[module]['label']:
@@ -110,14 +115,14 @@
print >> sys.stderr, __doc__
return 1
- print "Step 1: parse modules..."
+ grass.info("Step 1: parsing modules...")
modules = dict()
modules = parseModules()
- print "Step 2: read menu data..."
+ grass.info("Step 2: reading menu data...")
data = menudata.Data()
- print "Step 3: update menu data..."
+ grass.info("Step 3: updating menu data...")
updateData(data, modules)
- print "Step 4: write menu data (menudata.xml)..."
+ grass.info("Step 4: writing menu data (menudata.xml)...")
writeData(data)
return 0
More information about the grass-commit
mailing list