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

Sean Carolan scarolan at gmail.com
Thu Apr 26 21:24:38 CEST 2012


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.


More information about the Tutor mailing list