class traceback.StackSummary
-
classmethod extract(frame_gen, *, limit=None, lookup_lines=True, capture_locals=False)
-
Construct a
StackSummary
object from a frame generator (such as is returned bywalk_stack()
orwalk_tb()
).If limit is supplied, only this many frames are taken from frame_gen. If lookup_lines is
False
, the returnedFrameSummary
objects will not have read their lines in yet, making the cost of creating theStackSummary
cheaper (which may be valuable if it may not actually get formatted). If capture_locals isTrue
the local variables in eachFrameSummary
are captured as object representations.
-
classmethod from_list(a_list)
-
Construct a
StackSummary
object from a supplied old-style list of tuples. Each tuple should be a 4-tuple with filename, lineno, name, line as the elements.
Please login to continue.