<div><span class="gmail_quote">On 6/13/07, <b class="gmail_sendername">Andrej</b> &lt;<a href="mailto:andrej@paradise.net.nz">andrej@paradise.net.nz</a>&gt; wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wednesday 13 June 2007 19:58, Jim Tittsler wrote:<br><br>&gt; I frequently code my &quot;shell scripts&quot; in Python nowadays.&nbsp;&nbsp;That<br>&gt; way there is only one invocation of Python so I only pay the<br>&gt; startup cost once, and the resulting script can be a bit more
<br>&gt; transparent.&nbsp;&nbsp;Python&#39;s subprocess module lets me deal with<br>&gt; invoking subtasks and dealing with their I/O and inevitable<br>&gt; error conditions in readable ways.<br>Got my attention:&nbsp;&nbsp;how does that work?&nbsp;&nbsp;If you run a task
<br>scheduled via cron - how does that interact with the python<br>sub-process module?</blockquote><div><br class="webkit-block-placeholder"></div><div>I think you are reading too much into my answer. &nbsp;I am not connecting to a long running Python task. &nbsp;The subprocess module allows Python to invoke other programs.
</div><div>&nbsp;&nbsp;&lt;<a href="http://docs.python.org/lib/module-subprocess.html">http://docs.python.org/lib/module-subprocess.html</a>&gt;</div><div><br class="webkit-block-placeholder"></div><div>The task that cron would be invoking is a python script (which invokes the Python interpreter). &nbsp;It can then invoke other tasks using the subprocess module.
</div><div><br class="webkit-block-placeholder"></div><div>Jim</div><div><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">
--&nbsp;</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Jim Tittsler&nbsp;&nbsp; &nbsp;&nbsp;<a href="http://eXeLearning.org/">http://eXeLearning.org/</a></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px">
<font face="Helvetica" size="3" style="font: 12.0px Helvetica">Python Starship&nbsp;&nbsp;<a href="http://Starship.Python.net/crew/jwt/">http://Starship.Python.net/crew/jwt/</a></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px">
<br></p></span><br>&nbsp;</div></div>