Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Python 3.11.3

Contenu du module « traceback »

Liste des classes du module traceback

Nom de la classe Description
FrameSummary Information about a single frame from a traceback. [extrait de FrameSummary.__doc__]
StackSummary A list of FrameSummary objects, representing a stack of frames. [extrait de StackSummary.__doc__]
suppress Context manager to suppress specified exceptions [extrait de suppress.__doc__]
TracebackException An exception ready for rendering. [extrait de TracebackException.__doc__]

Liste des fonctions du module traceback

Signature de la fonction Description
clear_frames(tb) Clear all references to local variables in the frames of a traceback. [extrait de clear_frames.__doc__]
extract_stack(f=None, limit=None) Extract the raw traceback from the current stack frame. [extrait de extract_stack.__doc__]
extract_tb(tb, limit=None)
format_exc(limit=None, chain=True) Like print_exc() but return a string. [extrait de format_exc.__doc__]
format_exception(exc, /, value=<implicit>, tb=<implicit>, limit=None, chain=True) Format a stack trace and the exception information. [extrait de format_exception.__doc__]
format_exception_only(exc, /, value=<implicit>) Format the exception part of a traceback. [extrait de format_exception_only.__doc__]
format_list(extracted_list) Format a list of tuples or FrameSummary objects for printing. [extrait de format_list.__doc__]
format_stack(f=None, limit=None) Shorthand for 'format_list(extract_stack(f, limit))'. [extrait de format_stack.__doc__]
format_tb(tb, limit=None) A shorthand for 'format_list(extract_tb(tb, limit))'. [extrait de format_tb.__doc__]
print_exc(limit=None, file=None, chain=True) Shorthand for 'print_exception(*sys.exc_info(), limit, file)'. [extrait de print_exc.__doc__]
print_exception(exc, /, value=<implicit>, tb=<implicit>, limit=None, file=None, chain=True) Print exception up to 'limit' stack trace entries from 'tb' to 'file'. [extrait de print_exception.__doc__]
print_last(limit=None, file=None, chain=True) This is a shorthand for 'print_exception(sys.last_type, [extrait de print_last.__doc__]
print_list(extracted_list, file=None) Print the list of tuples as returned by extract_tb() or [extrait de print_list.__doc__]
print_stack(f=None, limit=None, file=None) Print a stack trace from its invocation point. [extrait de print_stack.__doc__]
print_tb(tb, limit=None, file=None) Print up to 'limit' stack trace entries from the traceback 'tb'. [extrait de print_tb.__doc__]
walk_stack(f) Walk a stack yielding the frame and line number for each frame. [extrait de walk_stack.__doc__]
walk_tb(tb) Walk a traceback yielding the frame and line number for each frame. [extrait de walk_tb.__doc__]