traceback
is a Python object which provides standard interface to extract, format and print the stack traces similar to the Python interpreter.
1
It exposes functions such as print_tb
(print stack trace entries), print_stack
(almost the same to print_tb
), extract_tb
(return StackSummary
object that contain a list of FrameSummary
object), extract_stack
(same as extract_tb
), format_tb
(return a list of strings processed based on the extract_tb
output) and format_stack
(same as format_tb
but dealing with extract_stack
instead).
FrameSummary
object is representing a ready to print information for stack trace. It includes data such as file name, line number, name, line and variable representation.