[GRASS-user] Python scripts- How to call external bin
katrin eggert
katrineggert1980 at gmail.com
Mon Jul 4 17:29:18 EDT 2011
Hello
In this case is an external binary written in C. So I will shall use the
subprocess.Popen() right?. Besides that general page you gave me, do you
know any other page that explains, in a easier way, thje use and
parameterizayion of subprocess.Popen()?
Thanks
Kat
2011/7/4 Glynn Clements <glynn at gclements.plus.com>
>
> katrin eggert wrote:
>
> > Just one question: I reading
> > http://grass.osgeo.org/programming6/pythonlib.html the "*GRASS-oriented
> > interface to subprocess module" and I'm wondering wich one of this
> functions
> > shall i use to run an external bin in Windows? run_command?*
>
> Does the external program use the GRASS parser? If it doesn't, you
> shouldn't use any of those functions; just use subprocess.Popen().
>
> If it uses the parser, then the correct command to use depends upon
> how you wish to interact with the child process. Read each of their
> descriptions to determine which is appropriate.
>
> All of them (except for exec_command) are simple wrappers around
> start_command, which itself just uses make_command to construct a
> suitable argument list to pass to Popen().
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110704/4b27e4c7/attachment.html
More information about the grass-user
mailing list