<div><span class="gmail_quote">On 6/13/07, <b class="gmail_sendername">Andrej</b> <<a href="mailto:andrej@paradise.net.nz">andrej@paradise.net.nz</a>> 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>> I frequently code my "shell scripts" in Python nowadays. That<br>> way there is only one invocation of Python so I only pay the<br>> startup cost once, and the resulting script can be a bit more
<br>> transparent. Python's subprocess module lets me deal with<br>> invoking subtasks and dealing with their I/O and inevitable<br>> error conditions in readable ways.<br>Got my attention: how does that work? 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. I am not connecting to a long running Python task. The subprocess module allows Python to invoke other programs.
</div><div> <<a href="http://docs.python.org/lib/module-subprocess.html">http://docs.python.org/lib/module-subprocess.html</a>></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). 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">
-- </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 <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 <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> </div></div>