On Thu, Jun 19, 2014 at 10:35 AM, <[email protected]> wrote:

> Use subprocess.Popen() directly for calling g.parser
>
> Glynn, please provide reasoning for this change, especially its first
line, since it is not in commit message and the motivation for this change
is spread over several threads.

Comment is the source code seems like a good place.

Thanks,
Vaclav


> Modified: grass/trunk/lib/python/script/core.py
> ===================================================================
> --- grass/trunk/lib/python/script/core.py       2014-06-18 19:59:38 UTC
> (rev 60869)
> +++ grass/trunk/lib/python/script/core.py       2014-06-19 14:35:05 UTC
> (rev 60870)
> @@ -644,7 +644,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)
>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to