[GRASS-SVN] r30641 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 19 08:22:14 EDT 2008


Author: martinl
Date: 2008-03-19 08:22:13 -0400 (Wed, 19 Mar 2008)
New Revision: 30641

Modified:
   grass/trunk/gui/wxpython/gui_modules/goutput.py
Log:
wxGUI: remove/replace '\b' or '\r' from stream (e.g. v.build output)


Modified: grass/trunk/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/goutput.py	2008-03-19 12:00:32 UTC (rev 30640)
+++ grass/trunk/gui/wxpython/gui_modules/goutput.py	2008-03-19 12:22:13 UTC (rev 30641)
@@ -322,6 +322,8 @@
 
     def write(self, s):
         s = s.replace('\n', os.linesep)
+        # remove/replace escape sequences '\b' or '\r' from stream
+        s = s.replace('\b', '').replace('\r', '%s' % os.linesep)
         message = ''
         for line in s.split(os.linesep):
             if len(line) == 0:



More information about the grass-commit mailing list