[GRASS-dev] running modules from python
Glynn Clements
glynn at gclements.plus.com
Wed Sep 17 15:25:14 PDT 2014
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 at gclements.plus.com>
More information about the grass-dev
mailing list