[GRASS-SVN] r61992 - grass/branches/releasebranch_7_0/lib/python/script
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 16 04:17:22 PDT 2014
Author: martinl
Date: 2014-09-16 04:17:22 -0700 (Tue, 16 Sep 2014)
New Revision: 61992
Modified:
grass/branches/releasebranch_7_0/lib/python/script/core.py
Log:
Use subprocess.Popen() directly for calling g.parser
(merge r60870 from trunk)
Modified: grass/branches/releasebranch_7_0/lib/python/script/core.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/script/core.py 2014-09-16 08:27:00 UTC (rev 61991)
+++ grass/branches/releasebranch_7_0/lib/python/script/core.py 2014-09-16 11:17:22 UTC (rev 61992)
@@ -651,7 +651,8 @@
else:
argv[0] = os.path.join(sys.path[0], name)
- p = Popen(['g.parser', '-n'] + argv, stdout=PIPE)
+ prog = "g.parser.exe" if sys.platform == "win32" else "g.parser"
+ p = subprocess.Popen([prog, '-n'] + argv, stdout=subprocess.PIPE)
s = p.communicate()[0]
lines = s.split('\0')
More information about the grass-commit
mailing list