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)
| 1664 | return framelist |
| 1665 | |
| 1666 | def getinnerframes(tb, context=1): |
| 1667 | """Get a list of records for a traceback's frame and all lower frames. |
| 1668 | |
| 1669 | Each record contains a frame object, filename, line number, function |
| 1670 | name, a list of lines of context, and index within the context.""" |
| 1671 | framelist = [] |
| 1672 | while tb: |
| 1673 | traceback_info = getframeinfo(tb, context) |
| 1674 | frameinfo = (tb.tb_frame,) + traceback_info |
| 1675 | framelist.append(FrameInfo(*frameinfo, positions=traceback_info.positions)) |
| 1676 | tb = tb.tb_next |
| 1677 | return framelist |
| 1678 | |
| 1679 | def currentframe(): |
| 1680 | """Return the frame of the caller or None if this is not possible.""" |
no test coverage detected
searching dependent graphs…