浏览代码

Allows nviz module to run TclTk nviz on Windows (and other platforms). Backport from develbranch_6 https://trac.osgeo.org/grass/changeset/40007

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40008 15284696-431f-4ddb-bdfa-cd5b030d7da7
Michael Barton 15 年之前
父节点
当前提交
33997b2018
共有 1 个文件被更改,包括 5 次插入10 次删除
  1. 5 10
      gui/wxpython/gui_modules/gcmd.py

+ 5 - 10
gui/wxpython/gui_modules/gcmd.py

@@ -456,16 +456,10 @@ class CommandThread(Thread):
         @param stdout redirect standard output or None
         @param stderr redirect standard error output or None
         """
+
         Thread.__init__(self)
-	
-        self.cmd = cmd
-	
-	# hack around platform-specific extension for binaries
-	if self.cmd[0] in globalvar.grassCmd['script']:
-	    self.cmd[0] = self.cmd[0] + globalvar.EXT_SCT
-	else:
-	    self.cmd[0] = self.cmd[0] + globalvar.EXT_BIN
-        
+
+        self.cmd    = cmd
         self.stdin  = stdin
         self.stdout = stdout
         self.stderr = stderr
@@ -499,7 +493,8 @@ class CommandThread(Thread):
             self.module = Popen(self.cmd,
                                 stdin=subprocess.PIPE,
                                 stdout=subprocess.PIPE,
-                                stderr=subprocess.PIPE)
+                                stderr=subprocess.PIPE,
+                                shell=sys.platform=="win32")
         except OSError, e:
             self.error = str(e)
             return 1