Hello Glynn<div>Just one question: I reading <a href="http://grass.osgeo.org/programming6/pythonlib.html">http://grass.osgeo.org/programming6/pythonlib.html</a> the &quot;<b>GRASS-oriented interface to subprocess module&quot; and I&#39;m wondering wich one of this functions shall i use to run an external bin in Windows? run_command?</b></div>
<div><b>Thanks<br></b></div><div><b><br></b><div class="gmail_quote">2011/7/1 Glynn Clements <span dir="ltr">&lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
katrin eggert wrote:<br>
<br>
&gt; I want to integrate in a Python script a call to an external binary (a small<br>
&gt; fucntion that I have done). What can i use to do this?<br>
<br>
</div>The standard Python functions for spawning child processes are<br>
subprocess.Popen() and subprocess.call()<br>
<br>
        <a href="http://docs.python.org/library/subprocess.html" target="_blank">http://docs.python.org/library/subprocess.html</a><br>
<br>
The grass.script module has its own versions of these functions, which<br>
set shell=True on Windows so that scripts work, but that doesn&#39;t<br>
matter if you&#39;re running a binary executable. It also has several<br>
functions which are intended specifically for running GRASS modules<br>
(anything that uses the GRASS command-line parser).<br>
<font color="#888888"><br>
--<br>
Glynn Clements &lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>&gt;<br>
</font></blockquote></div><br></div>