40
It should work on any POSIX system (although looking at the /proc filesystem, as others have suggested, is easier if you know it's going to be there).
However: os.kill may also fail if you don't have permission to signal the process. You would need to do something like:
import sys
import os
import errno
try:
os.kill(int(sys.argv[1]), 0)
except OSError, err:
if err.errno == errno.ESRCH:
print "Not running"
elif err.errno == errno.EPERM:
print "No permission to signal this process!"
else:
print "Unknown error"
else:
print "Running"