traceback tool to increase efficiency.

Hunter Peress hu.peress at
Mon Aug 12 18:37:46 CEST 2002

I've tried traceback.print_stack() and inspect.stack() and 
inspect.trace() and they don't do what I want.

Here's what Im looking for.

Imagine this simple code:

import time
def a():
   print "hi from a"

def b():
   print "hi from b"

print time.localtime()

So after this runs, I want to look at this "traceback" type thing, and 
be able to see a list of all methods

a() in file whatever
print(" SADSADSAD ")in file sys?

localtime() in file time
print ([localtimelist]) in file time
b() in file whatever

I want this because I have a 5000 line program that I need to get 
familiar with, and its pretty much sphagetti code. Doing a normal run of 
the program, and then being able to look at the methods that have been 
called would be a great help.

I like to use tools like this for any language i can.


More information about the Python-list mailing list