brennivin.traceback2 module

Utility functions for better traceback It has the same interface as the good old traceback module.

Appropriate functions have the additional show_locals argument which will cause us to try to display local variables for each frame.

Also, the stack extraction functions such as print_stack() have an up argument used to trim the deepest levels of a callstack, such as when they are called from a utility function in which we aren’t interested.

brennivin.traceback2.extract_stack(f=None, limit=None, up=0, extract_locals=0)
brennivin.traceback2.extract_tb(tb, limit=None, extract_locals=0)
brennivin.traceback2.format_exc(limit=None, show_locals=0, format=0)
brennivin.traceback2.format_exception(etype, value, tb, limit=None, show_locals=0, format=0)
brennivin.traceback2.format_list(extracted_list, show_locals=0, format=0)
brennivin.traceback2.format_stack(f=None, limit=None, up=0, show_locals=0, format=0)
brennivin.traceback2.format_tb(tb, limit=None, show_locals=0, format=0)
brennivin.traceback2.print_exc(limit=None, file=None, show_locals=0, format=0)
brennivin.traceback2.print_exception(etype, value, tb, limit=None, file=None, show_locals=0, format=0)
brennivin.traceback2.print_stack(f=None, limit=None, up=0, show_locals=0, format=0, file=None)
brennivin.traceback2.print_tb(tb, limit=None, file=None, show_locals=0, format=0)