PyDocs

Nav

Python Runtime Services

FrameSummary

  • FrameSummary(filename, lineno, name, *, lookup_line=True, locals=None, line=None, end_lineno=None, colno=None, end_colno=None)
Information about a single frame from a traceback.

- :attr:`filename` The filename for the frame.
- :attr:`lineno` The line within filename for the frame that was
  active when the frame was captured.
- :attr:`name` The name of the function or method that was executing
  when the frame was captured.
- :attr:`line` The text from the linecache module for the line
  of code that was running when the frame was captured.
- :attr:`locals` Either None if locals were not supplied, or a dict
  mapping the name to the repr() of the variable.
- :attr:`end_lineno` The last line number of the source code for this frame.
  By default, it is set to lineno and indexation starts from 1.
- :attr:`colno` The column number of the source code for this frame.
  By default, it is None and indexation starts from 0.
- :attr:`end_colno` The last column number of the source code for this frame.
  By default, it is None and indexation starts from 0.
Members of FrameSummary

c

colno
The column number of the source code for this frame.

e

end_colno
The last column number of the source code for this frame.
end_lineno
The last line number of the source code for this frame.

f

filename
The filename of the source code for this frame.

l

line
A string representing the source code for this frame, with leading and trailing whitespace stripped.
lineno
The line number of the source code for this frame.

n

name
Equivalent to accessing f.f_code.co_name on a frame object f.
0 Examples
No examples for traceback/FrameSummary.
See Also
No see-alsos for traceback/FrameSummary
0 Notes
No notes for FrameSummary