You can get much more detail on context for different aspects w/o leaving python- just open and read from one of the <code>/proc/<pid>/attr/</code> files: <code>current, exec, fscreate, keycreate, prev, or sockcreate</code>.  That would raise an IOError you can catch if the pid is invalid :D