1 Jul 2011 01:34
Re: Python scripts- How to call external bin
Glynn Clements <glynn <at> gclements.plus.com>
2011-06-30 23:34:33 GMT
2011-06-30 23:34:33 GMT
katrin eggert wrote: > I want to integrate in a Python script a call to an external binary (a small > fucntion that I have done). What can i use to do this? The standard Python functions for spawning child processes are subprocess.Popen() and subprocess.call() http://docs.python.org/library/subprocess.html The grass.script module has its own versions of these functions, which set shell=True on Windows so that scripts work, but that doesn't matter if you're running a binary executable. It also has several functions which are intended specifically for running GRASS modules (anything that uses the GRASS command-line parser). -- -- Glynn Clements <glynn <at> gclements.plus.com> _______________________________________________ grass-user mailing list grass-user <at> lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
RSS Feed