[GRASS-SVN] r41459 - grass/branches/releasebranch_6_4/gui/wxpython
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Mar 16 12:04:04 EDT 2010
Author: martinl
Date: 2010-03-16 12:04:03 -0400 (Tue, 16 Mar 2010)
New Revision: 41459
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
Log:
workaround for #1004
Modified: grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py 2010-03-16 14:02:15 UTC (rev 41458)
+++ grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py 2010-03-16 16:04:03 UTC (rev 41459)
@@ -453,13 +453,23 @@
event.Skip()
def OnRunCmd(self, event):
- """Run command"""
- cmdString = event.GetString()
+ """!Run command
+ @todo: Handle unicode with shlex
+ """
+ try:
+ cmdString = str(event.GetString())
+ except UnicodeError:
+ cmdString = event.GetString()
+
if cmdString[:2] == 'd.' and not self.curr_page:
self.NewDisplay(show=True)
+
+ if isinstance(cmdString, unicode):
+ cmd = cmdString.split(' ')
+ else:
+ cmd = shlex.split(cmdString)
- cmd = shlex.split(str(cmdString))
if len(cmd) > 1:
self.goutput.RunCmd(cmd, switchPage=True)
else:
More information about the grass-commit
mailing list