[GRASS-SVN] r61905 - in grass/trunk/gui/wxpython: core gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Sep 13 11:33:28 PDT 2014
Author: annakrat
Date: 2014-09-13 11:33:28 -0700 (Sat, 13 Sep 2014)
New Revision: 61905
Modified:
grass/trunk/gui/wxpython/core/gcmd.py
grass/trunk/gui/wxpython/gui_core/forms.py
grass/trunk/gui/wxpython/gui_core/prompt.py
Log:
wxGUI: completely remove GetRealCmd, hopefully not needed anymore for Windows
Modified: grass/trunk/gui/wxpython/core/gcmd.py
===================================================================
--- grass/trunk/gui/wxpython/core/gcmd.py 2014-09-13 18:32:08 UTC (rev 61904)
+++ grass/trunk/gui/wxpython/core/gcmd.py 2014-09-13 18:33:28 UTC (rev 61905)
@@ -60,15 +60,6 @@
return string
_ = null_gettext
-def GetRealCmd(cmd):
- """Return real command name - only for MS Windows
- """
-# if sys.platform == 'win32':
-# for ext in globalvar.grassScripts.keys():
-# if cmd in globalvar.grassScripts[ext]:
-# return cmd + ext
-
- return cmd
def DecodeString(string):
"""Decode string using system encoding
@@ -701,7 +692,7 @@
Debug.msg(2, "gcmd.RunCommand(): command started")
start = time.time()
- ps = grass.start_command(GetRealCmd(prog), flags, overwrite, quiet, verbose, **kwargs)
+ ps = grass.start_command(prog, flags, overwrite, quiet, verbose, **kwargs)
if stdin:
ps.stdin.write(stdin)
Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py 2014-09-13 18:32:08 UTC (rev 61904)
+++ grass/trunk/gui/wxpython/gui_core/forms.py 2014-09-13 18:33:28 UTC (rev 61905)
@@ -2302,7 +2302,7 @@
# parse the interface decription
try:
global _blackList
- self.grass_task = gtask.parse_interface(gcmd.GetRealCmd(cmd[0]),
+ self.grass_task = gtask.parse_interface(cmd[0],
blackList = _blackList)
except (grass.ScriptError, ValueError) as e:
raise gcmd.GException(e.value)
@@ -2463,7 +2463,7 @@
from core.debug import Debug
Debug.msg(1, "forms.py called using command: %s" % sys.argv[1])
cmd = utils.split(sys.argv[1])
- task = gtask.grassTask(gcmd.GetRealCmd(cmd[0]))
+ task = gtask.grassTask(cmd[0])
task.set_options(cmd[1:])
Debug.msg(1, "forms.py opening form for: %s" % task.get_cmd(ignoreErrors=True))
app = GrassGUIApp(task)
Modified: grass/trunk/gui/wxpython/gui_core/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/prompt.py 2014-09-13 18:32:08 UTC (rev 61904)
+++ grass/trunk/gui/wxpython/gui_core/prompt.py 2014-09-13 18:33:28 UTC (rev 61905)
@@ -32,7 +32,7 @@
from core import globalvar
from core import utils
-from core.gcmd import EncodeString, DecodeString, GetRealCmd
+from core.gcmd import EncodeString, DecodeString
from core.utils import _
@@ -260,7 +260,7 @@
if not self.cmdDesc or cmd != self.cmdDesc.get_name():
try:
- self.cmdDesc = gtask.parse_interface(GetRealCmd(cmd))
+ self.cmdDesc = gtask.parse_interface(cmd)
except IOError:
self.cmdDesc = None
@@ -388,7 +388,7 @@
if cmd not in globalvar.grassCmd:
return
- info = gtask.command_info(GetRealCmd(cmd))
+ info = gtask.command_info(cmd)
self.CallTipSetBackground("#f4f4d1")
self.CallTipSetForeground("BLACK")
@@ -575,7 +575,7 @@
if cmd in globalvar.grassCmd and \
(not self.cmdDesc or cmd != self.cmdDesc.get_name()):
try:
- self.cmdDesc = gtask.parse_interface(GetRealCmd(cmd))
+ self.cmdDesc = gtask.parse_interface(cmd)
except IOError:
self.cmdDesc = None
event.Skip()
More information about the grass-commit
mailing list