[Tutor] Python equivalent of "kill -0 PID"

Joel Goldstick joel.goldstick at gmail.com
Thu Apr 26 21:51:17 CEST 2012


On Thu, Apr 26, 2012 at 3:24 PM, Sean Carolan <scarolan at gmail.com> wrote:
> In bash you can do this to see if a process is running:
>
> [scarolan at kurobox:~/bin]$ kill -0 24275
> [scarolan at kurobox:~/bin]$ echo $?
> 0
>
> Is there a python equivalent?  I tried using os.kill() but did not see
> any way to capture the output.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor


I don't know the answer to your question, but I googled this article:

http://www.ibm.com/developerworks/aix/library/au-python/

It talks about various sys admin things you can do with python.  It
might get you started

-- 
Joel Goldstick


More information about the Tutor mailing list