As of Python 2.4 you can also compile in support for C-level profiling into the interpreter (--enable-profiling). See the in-dev docs (http://www.python.org/dev/doc/devel/) for details.