Obtaining tracebacks on other threads in Python
===============================================
by Fazal Majid (www.majid.info), 2002-10-11


David Beazley added advanced debugging functions to the Python
interpreter, and they have been folded into the 2.2 release.

I used these hooks to build a debugging module that is useful when you
are looking for deadlocks in a multithreaded application. I've built
and tested this only on Solaris 8/x86, but the code should be pretty
portable. Of course, I disclaim any liability if this code should
crash your system, erase your homework, eat your dog (who also ate your
homework) or otherwise have any undesirable effect.

Unfortunately, I was unable to find a way to get a stack frame for
a specific thread (either by the thread ID or using threading Thread
objects), as Python does not save the thread ID in its thread state.

Building and installing
=======================

Download threadframe.tar.gz. You can use the Makefile. There is a small
test program test.py that illustrates how to use this module to dump
stack frames of all the Python interpreter threads. A sample run is
available for your perusal.
