[GRASS-SVN] r46182 - grass-addons/gui/wxpython/wx.psmap/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 4 12:05:36 EDT 2011


Author: martinl
Date: 2011-05-04 09:05:36 -0700 (Wed, 04 May 2011)
New Revision: 46182

Modified:
   grass-addons/gui/wxpython/wx.psmap/gui_modules/psmap_dialogs.py
Log:
wx.psmap: run ps.map in quiet mode


Modified: grass-addons/gui/wxpython/wx.psmap/gui_modules/psmap_dialogs.py
===================================================================
--- grass-addons/gui/wxpython/wx.psmap/gui_modules/psmap_dialogs.py	2011-05-04 09:37:11 UTC (rev 46181)
+++ grass-addons/gui/wxpython/wx.psmap/gui_modules/psmap_dialogs.py	2011-05-04 16:05:36 UTC (rev 46182)
@@ -792,7 +792,8 @@
                 if line.startswith('paper'): 
                     if len(line.split()) > 1:
                         pformat = line.split()[1]
-                        availableFormats = self._toDict(grass.read_command('ps.map', flags = 'p'))
+                        availableFormats = self._toDict(grass.read_command('ps.map', flags = 'p',
+                                                                           quiet = True))
                         # e.g. paper a3 
                         try:
                             instr['Format'] = pformat
@@ -1728,7 +1729,7 @@
         PsmapDialog.__init__(self, parent = parent, id = id, title = "Page setup",  settings = settings)
         
         self.cat = ['Units', 'Format', 'Orientation', 'Width', 'Height', 'Left', 'Right', 'Top', 'Bottom']
-        paperString = RunCommand('ps.map', flags = 'p', read = True)
+        paperString = RunCommand('ps.map', flags = 'p', read = True, quiet = True)
         self.paperTable = self._toList(paperString) 
         self.unitsList = self.unitConv.getPageUnits()
         self.pageSetupDict = settings[id].GetInstruction()
@@ -5695,8 +5696,9 @@
     """!Run ps.map -b to get information about map bounding box"""
     try:
         bb = map(float, grass.read_command('ps.map',
-                                        flags = 'b',
-                                        input = filename).strip().split('=')[1].split(','))
+                                           flags = 'b',
+                                           quiet = True,
+                                           input = filename).strip().split('=')[1].split(','))
     except (grass.ScriptError, IndexError):
         GError(message = _("Unable to run `ps.map -b`"))
         return None



More information about the grass-commit mailing list