traceback tool to increase efficiency.
Hunter Peress
hu.peress at mail.mcgill.ca
Mon Aug 12 12:37:46 EDT 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"
a():
print "SADSADSAD"
print time.localtime()
b():
So after this runs, I want to look at this "traceback" type thing, and
be able to see a list of all methods called...eg:
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.
-Hunter
More information about the Python-list
mailing list