python runtime services print_exception(typevaluetraceback [limit [file]]prints exception information and stack trace to file type is the exception typeand value is the exception value limit and file are the same as in print_tb(print_exc([limit [file]]same as print_exception(applied to the information returned by the sys exc_info(function format_exc([limit [file]]returns string containing the same information printed by print_exc(print_last([limit [file]]same as print_exception (sys last_typesys last_valuesys last_tracebacklimitfileprint_stack([frame [limit [file]]]prints stack trace from the point at which it' invoked frame specifies an optional stack frame from which to start limit and file have the same meaning as for print_tb(extract_tb(traceback [limit]extracts the stack trace information used by print_tb(the return value is list of tuples of the form (filenamelinefuncnametextcontaining the same information that normally appears in stack trace limit is the number of entries to return extract_stack([frame [limit]]extracts the same stack trace information used by print_stack()but obtained from the stack frame frame if frame is omittedthe current stack frame of the caller is used and limit is the number of entries to return format_list(listformats stack trace information for printing list is list of tuples as returned by extract_tb(or extract_stack(format_exception_only(typevalueformats exception information for printing format_exception(typevaluetraceback [limit]formats an exception and stack trace for printing format_tb(traceback [limit]same as format_list(extract_tb(tracebacklimit)format_stack([frame [limit]]same as format_list(extract_stack(framelimit)tb_lineno(tracebackreturns the line number set in traceback object lib fl ff