Mark's answer is the way to go, after all, that's why the /proc file system is there. For something a little more copy/pasteable:
>>> import os.path >>> os.path.exists("/proc/0") False >>> os.path.exists("/proc/12") True
on linux, you can look in the directory /proc/$PID to get information about that process. In fact, if the directory exists, the process is running.