[GRASS-SVN] r44088 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Oct 30 05:18:58 EDT 2010
Author: martinl
Date: 2010-10-30 02:18:58 -0700 (Sat, 30 Oct 2010)
New Revision: 44088
Modified:
grass/trunk/gui/wxpython/gui_modules/prompt.py
grass/trunk/gui/wxpython/gui_modules/utils.py
Log:
wxGUI: use platform specific shlex.split() in command prompt
Modified: grass/trunk/gui/wxpython/gui_modules/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/prompt.py 2010-10-30 09:13:52 UTC (rev 44087)
+++ grass/trunk/gui/wxpython/gui_modules/prompt.py 2010-10-30 09:18:58 UTC (rev 44088)
@@ -613,7 +613,7 @@
if cmdString[:2] == 'd.' and not self.parent.curr_page:
self.parent.NewDisplay(show=True)
- cmd = shlex.split(str(cmdString))
+ cmd = utils.split(cmdString)
if len(cmd) > 1:
self.parent.RunCmd(cmd, switchPage = True)
else:
Modified: grass/trunk/gui/wxpython/gui_modules/utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/utils.py 2010-10-30 09:13:52 UTC (rev 44087)
+++ grass/trunk/gui/wxpython/gui_modules/utils.py 2010-10-30 09:18:58 UTC (rev 44088)
@@ -18,6 +18,7 @@
import string
import glob
import locale
+import shlex
import globalvar
sys.path.append(os.path.join(globalvar.ETCDIR, "python"))
@@ -31,6 +32,10 @@
"""!Remove redundant whitespace from a string"""
return string.join(string.split(text), ' ')
+def split(s):
+ """!Platform spefic shlex.split"""
+ return shlex.split(s, posix = (sys.platform != "win32"))
+
def GetTempfile(pref=None):
"""
Creates GRASS temporary file using defined prefix.
More information about the grass-commit
mailing list