Hi devs,
is there ant way to use run_command using as input command a string or
a list of strings?
thanks
--
ciao
Luca
http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
Hi devs,
is there ant way to use run_command using as input command a string or
a list of strings?
thanks
--
ciao
Luca
http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
Hi Luca,
On Wed, Sep 17, 2014 at 5:23 AM, Luca Delucchi <lucadeluge@gmail.com> wrote:
Hi devs,
is there ant way to use run_command using as input command a string or
a list of strings?
would the function CmdToTuple(cmd) in wxpython/core/utils.py be useful for
you? I think it takes list of strings and converts it in the format you
need for run_command. I wanted it to move it to lib/python/script/utils.py
anyway.
Anna
thanks
--
ciao
Lucahttp://gis.cri.fmach.it/delucchi/
www.lucadelu.org
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Luca Delucchi wrote:
is there ant way to use run_command using as input command a string or
a list of strings?
Why would you do that?
The grass.script.core.*_command functions are all thin layers on top
of Python's subprocess.Popen() interface. The only reason they exist
is to allow the programmer to use Python's keyword-argument syntax
rather than having to construct the argument list separately.
If you already have an argument list, just use subprocess.Popen() (or
grass.script.core.Popen(), which will hopefully work around some of
Windows' shortcomings) directly.
--
Glynn Clements <glynn@gclements.plus.com>