[GRASS-SVN] r29585 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 7 03:53:59 EST 2008
Author: martinl
Date: 2008-01-07 03:53:58 -0500 (Mon, 07 Jan 2008)
New Revision: 29585
Modified:
grass/trunk/gui/wxpython/gui_modules/mapdisp.py
grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
Log:
wxGUI: fix stdout (command output window)
Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2008-01-06 15:50:37 UTC (rev 29584)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2008-01-07 08:53:58 UTC (rev 29585)
@@ -2651,8 +2651,10 @@
if vcmd:
self.gismanager.goutput.RunCmd(vcmd)
else:
- os.system(' '.join(rcmd))
- os.system(' '.join(vcmd))
+ if rcmd:
+ gcmd.Command(rcmd)
+ if vcmd:
+ gcmd.Command(vcmd)
def OnAnalyze(self, event):
"""
Modified: grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py 2008-01-06 15:50:37 UTC (rev 29584)
+++ grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py 2008-01-07 08:53:58 UTC (rev 29585)
@@ -1261,12 +1261,13 @@
if len(s) == 0:
return
s = s.replace('\n', os.linesep)
- p1 = self.gmstc.GetCurrentPos() # get caret position
- self.gmstc.AddTextWrapped(s)
- self.gmstc.EnsureCaretVisible()
- p2 = self.gmstc.GetCurrentPos()
- self.gmstc.StartStyling(p1, 0xff)
- self.gmstc.SetStyling(p2 - p1 + 1, self.gmstc.StyleOutput)
+ for line in s.split(os.linesep):
+ p1 = self.gmstc.GetCurrentPos() # get caret position
+ self.gmstc.AddTextWrapped(line)
+ self.gmstc.EnsureCaretVisible()
+ p2 = self.gmstc.GetCurrentPos()
+ self.gmstc.StartStyling(p1, 0xff)
+ self.gmstc.SetStyling(p2 - p1 + 1, self.gmstc.StyleOutput)
class GMStderr:
"""GMConsole standard error output
More information about the grass-commit
mailing list