code.Traceback API [rev. unknown]

class Traceback(list):

Traceback objects encapsulate and offer higher level access to Traceback entries.

methods:

def __init__(self, tb):

initialize from given python traceback object.

def cut(self, path=None, lineno=None, firstlineno=None):

return a Traceback instance wrapping part of this Traceback by provding any combination of path, lineno and firstlineno, the first frame to start the to-be-returned traceback is determined this allows cutting the first part of a Traceback instance e.g. for formatting reasons (removing some uninteresting bits that deal with handling of the exception/traceback)

def filter(self, fn=<function <lambda> at 0x406f0304>):

return a Traceback instance with certain items removed fn is a function that gets a single argument, a TracebackItem instance, and should return True when the item should be added to the Traceback, False when not by default this removes all the TracebackItems which are hidden (see ishidden() above)

def getcrashentry(self):

return last non-hidden traceback entry that lead to the exception of a traceback.

def recursionindex(self):

return the index of the frame/TracebackItem where recursion originates if appropriate, None if no recursion occurred

def __getitem__(self, key):