MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / getinnerframes

Function getinnerframes

tools/python-3.11.9-amd64/Lib/inspect.py:1732–1743  ·  view source on GitHub ↗

Get a list of records for a traceback's frame and all lower frames. Each record contains a frame object, filename, line number, function name, a list of lines of context, and index within the context.

(tb, context=1)

Source from the content-addressed store, hash-verified

1730 return framelist
1731
1732def getinnerframes(tb, context=1):
1733 """Get a list of records for a traceback's frame and all lower frames.
1734
1735 Each record contains a frame object, filename, line number, function
1736 name, a list of lines of context, and index within the context."""
1737 framelist = []
1738 while tb:
1739 traceback_info = getframeinfo(tb, context)
1740 frameinfo = (tb.tb_frame,) + traceback_info
1741 framelist.append(FrameInfo(*frameinfo, positions=traceback_info.positions))
1742 tb = tb.tb_next
1743 return framelist
1744
1745def currentframe():
1746 """Return the frame of the caller or None if this is not possible."""

Callers 1

traceFunction · 0.85

Calls 3

getframeinfoFunction · 0.85
FrameInfoClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected