[wellylug] Help in finding a good technical/Linux related bookstore

Jim Tittsler jtittsler at gmail.com
Wed Jun 13 21:07:26 NZST 2007


On 6/13/07, Andrej <andrej at paradise.net.nz> wrote:
>
> On Wednesday 13 June 2007 19:58, Jim Tittsler wrote:
>
> > I frequently code my "shell scripts" in Python nowadays.  That
> > way there is only one invocation of Python so I only pay the
> > startup cost once, and the resulting script can be a bit more
> > transparent.  Python's subprocess module lets me deal with
> > invoking subtasks and dealing with their I/O and inevitable
> > error conditions in readable ways.
> Got my attention:  how does that work?  If you run a task
> scheduled via cron - how does that interact with the python
> sub-process module?


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.
  <http://docs.python.org/lib/module-subprocess.html>

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.

Jim

-- 

Jim Tittsler     http://eXeLearning.org/

Python Starship  http://Starship.Python.net/crew/jwt/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wellylug.org.nz/pipermail/wellylug/attachments/20070613/a15d9057/attachment.htm 


More information about the wellylug mailing list