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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat May 29 15:30:11 EDT 2010


Author: martinl
Date: 2010-05-29 15:30:11 -0400 (Sat, 29 May 2010)
New Revision: 42387

Modified:
   grass/trunk/gui/wxpython/gui_modules/debug.py
   grass/trunk/gui/wxpython/gui_modules/gcmd.py
Log:
wxGUI: force flushing debug messages (required on MS Windows)


Modified: grass/trunk/gui/wxpython/gui_modules/debug.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/debug.py	2010-05-29 19:24:25 UTC (rev 42386)
+++ grass/trunk/gui/wxpython/gui_modules/debug.py	2010-05-29 19:30:11 UTC (rev 42387)
@@ -58,6 +58,8 @@
             else:
                 print >> sys.stderr, "GUI D%d/%d: " % (level, self.debuglevel) + \
                     message
+            sys.stderr.flush() # force flush (required for MS Windows)
+        
     def get_level(self):
         """!Return current GUI debug level"""
         return self.debuglevel

Modified: grass/trunk/gui/wxpython/gui_modules/gcmd.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gcmd.py	2010-05-29 19:24:25 UTC (rev 42386)
+++ grass/trunk/gui/wxpython/gui_modules/gcmd.py	2010-05-29 19:30:11 UTC (rev 42387)
@@ -363,6 +363,7 @@
         @param stdout  redirect standard output or None
         @param stderr  redirect standard error output or None
         """
+        Debug.msg(1, "gcmd.Command(): %s" % ' '.join(cmd))
         self.cmd = cmd
         self.stderr = stderr
 	
@@ -610,6 +611,9 @@
 def RunCommand(prog, flags = "", overwrite = False, quiet = False, verbose = False,
                parent = None, read = False, stdin = None, getErrorMsg = False, **kwargs):
     """!Run GRASS command"""
+    Debug.msg(1, "gcmd.RunCommand(): %s" % ' '.join(grass.make_command(prog, flags, overwrite,
+                                                                       quiet, verbose, **kwargs)))
+    
     kwargs['stderr'] = subprocess.PIPE
     
     if read:



More information about the grass-commit mailing list