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)
| 1730 | return framelist |
| 1731 | |
| 1732 | def 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 | |
| 1745 | def currentframe(): |
| 1746 | """Return the frame of the caller or None if this is not possible.""" |
no test coverage detected