Tracing functions in python
nedbatchelder.com