[GRASS-SVN] r37395 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 23 05:39:27 EDT 2009
Author: martinl
Date: 2009-05-23 05:39:27 -0400 (Sat, 23 May 2009)
New Revision: 37395
Modified:
grass/trunk/gui/wxpython/gui_modules/prompt.py
Log:
wxGUI: attempt to fix trac #528 (wxGUI cmd: r.mapcalc fails (quoting + args with spaces)
based on ticket patch
Modified: grass/trunk/gui/wxpython/gui_modules/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/prompt.py 2009-05-23 08:29:05 UTC (rev 37394)
+++ grass/trunk/gui/wxpython/gui_modules/prompt.py 2009-05-23 09:39:27 UTC (rev 37395)
@@ -6,7 +6,7 @@
Classes:
- GPrompt
-(C) 2009 by the GRASS Development Team
+(C) 2008-2009 by the GRASS Development Team
This program is free software under the GNU General Public
License (>=v2). Read the file COPYING that comes with GRASS
for details.
@@ -14,6 +14,8 @@
@author Martin Landa <landa.martin gmail.com>
"""
+import shlex
+
import wx
class GPrompt:
@@ -70,15 +72,16 @@
def OnRunCmd(self, event):
"""Run command"""
- cmd = event.GetString()
+ cmdString = event.GetString()
if self.parent.GetName() != "LayerManager":
return
-
- if cmd[:2] == 'd.' and not self.parent.curr_page:
+
+ if cmdString[:2] == 'd.' and not self.parent.curr_page:
self.parent.NewDisplay(show=True)
-
- if len(cmd.split(' ')) > 1:
+
+ cmd = shlex.split(str(cmdString))
+ if len(cmd) > 1:
self.parent.goutput.RunCmd(cmd, switchPage = True)
else:
self.parent.goutput.RunCmd(cmd, switchPage = False)
More information about the grass-commit
mailing list