Skip to content

_Framework.ControlElement.traceback (runtime)

Live 12 — Live Object Model & framework reference (descriptions and signatures).

Functions

clear_frames(tb)

extract_stack(f=None, limit=None)

extract_tb(tb, limit=None)

format_exc(limit=None, chain=True)

format_exception(exc, /, value=<implicit>, tb=<implicit>, limit=None, chain=True)

format_exception_only(exc, /, value=<implicit>)

format_list(extracted_list)

format_stack(f=None, limit=None)

format_tb(tb, limit=None)

walk_stack(f)

walk_tb(tb)

Classes

class FrameSummary

Properties

  • _original_line
  • line

Methods

__init__(self, filename, lineno, name, *, lookup_line=True, locals=None, line=None, end_lineno=None, colno=None, end_colno=None)

Initialize self. See help(type(self)) for accurate signature.

Attributes

  • _line = <member '_line' of 'FrameSummary' objects>
  • colno = <member 'colno' of 'FrameSummary' objects>
  • end_colno = <member 'end_colno' of 'FrameSummary' objects>
  • end_lineno = <member 'end_lineno' of 'FrameSummary' objects>
  • filename = <member 'filename' of 'FrameSummary' objects>
  • lineno = <member 'lineno' of 'FrameSummary' objects>
  • locals = <member 'locals' of 'FrameSummary' objects>
  • name = <member 'name' of 'FrameSummary' objects>

class StackSummary(list)

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

Methods

__init__(self, /, *args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

_extract_from_extended_frame_gen(frame_gen, *, limit=None, lookup_lines=True, capture_locals=False)
append(self, object, /)

Append object to the end of the list.

clear(self, /)

Remove all items from list.

copy(self, /)

Return a shallow copy of the list.

count(self, value, /)

Return number of occurrences of value.

extend(self, iterable, /)

Extend list by appending elements from the iterable.

extract(frame_gen, *, limit=None, lookup_lines=True, capture_locals=False)
format(self)
format_frame_summary(self, frame_summary)
from_list(a_list)
index(self, value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

insert(self, index, object, /)

Insert object before index.

pop(self, index=-1, /)

Remove and return item at index (default last).

Raises IndexError if list is empty or index is out of range.

remove(self, value, /)

Remove first occurrence of value.

Raises ValueError if the value is not present.

reverse(self, /)

Reverse IN PLACE.

sort(self, /, *, key=None, reverse=False)

Sort the list in ascending order and return None.

The sort is in-place (i.e. the list itself is modified) and stable (i.e. the order of two equal elements is maintained).

If a key function is given, apply it once to each list item and sort them, ascending or descending, according to their function values.

The reverse flag can be set to sort in descending order.

class TracebackException

Methods

__init__(self, exc_type, exc_value, exc_traceback, *, limit=None, lookup_lines=True, capture_locals=False, compact=False, max_group_width=15, max_group_depth=10, _seen=None)

Initialize self. See help(type(self)) for accurate signature.

_format_syntax_error(self, stype)
_load_lines(self)
format(self, *, chain=True, _ctx=None)
format_exception_only(self)
from_exception(exc, *args, **kwargs)
print(self, *, file=None, chain=True)

class suppress(AbstractContextManager)

Helper class that provides a standard way to create an ABC using inheritance.

Methods

__init__(self, *exceptions)

Initialize self. See help(type(self)) for accurate signature.

Attributes

  • _abc_impl = <_abc._abc_data object at 0x11ab75080> - Internal state held by ABC machinery.