Get the status of a process

Michael Hudson mwh at
Fri Nov 28 14:08:26 CET 2003

Gilles Lenfant <nospam.glenfant at> writes:

> Hi,
> I'm pretty brain dead reading the python docs about the processes.
> I'm looking for some pythonig way to do a...
> $ ps x | grep <some_pid>
> ... in order to know if <some_pid> is running or not.
> Thanks in advance for any hint.

os.kill(some_pid, 0)?

You might get EPERM if the process is running, but as a different


  Gullible editorial staff continues to post links to any and all
  articles that vaguely criticize Linux in any way.
         -- Reason #4 for quitting slashdot today, from

More information about the Python-list mailing list