[GRASS-SVN] r50412 - in grass/trunk/gui/wxpython: core gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 24 09:36:51 EST 2012
Author: martinl
Date: 2012-01-24 06:36:51 -0800 (Tue, 24 Jan 2012)
New Revision: 50412
Modified:
grass/trunk/gui/wxpython/core/gcmd.py
grass/trunk/gui/wxpython/gui_core/prompt.py
Log:
wxGUI: eliminate globalvar.grassCmd['scripts']
Modified: grass/trunk/gui/wxpython/core/gcmd.py
===================================================================
--- grass/trunk/gui/wxpython/core/gcmd.py 2012-01-24 11:59:24 UTC (rev 50411)
+++ grass/trunk/gui/wxpython/core/gcmd.py 2012-01-24 14:36:51 UTC (rev 50412)
@@ -47,6 +47,7 @@
from core import globalvar
from core.debug import Debug
+from core.utils import GetRealCmd
def DecodeString(string):
"""!Decode string using system encoding
@@ -505,7 +506,7 @@
args = self.cmd
if sys.platform == 'win32':
ext = os.path.splitext(self.cmd[0])[1] == '.py'
- if ext or self.cmd[0] in globalvar.grassCmd['script']:
+ if ext or self.cmd[0] in globalvar.grassScripts['.py']:
os.chdir(os.path.join(os.getenv('GISBASE'), 'scripts'))
if not ext:
args = [sys.executable, self.cmd[0] + '.py'] + self.cmd[1:]
@@ -632,12 +633,8 @@
Debug.msg(2, "gcmd.RunCommand(): command started")
start = time.time()
- if sys.platform == "win32":
- if prog in globalvar.grassCmd['script']:
- prog += globalvar.EXT_SCT
+ 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)
ps.stdin.close()
Modified: grass/trunk/gui/wxpython/gui_core/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/prompt.py 2012-01-24 11:59:24 UTC (rev 50411)
+++ grass/trunk/gui/wxpython/gui_core/prompt.py 2012-01-24 14:36:51 UTC (rev 50412)
@@ -791,8 +791,6 @@
self.SetCurrentPos(pos)
cmd = text.strip().split(' ')[0]
- if sys.platform == "win32" and cmd in globalvar.grassCmd['script']:
- cmd += globalvar.EXT_SCT
if not self.cmdDesc or cmd != self.cmdDesc.get_name():
if cmd in ('r.mapcalc', 'r3.mapcalc') and \
More information about the grass-commit
mailing list