lsst.pex.config  14.0-4-gae1598d+1
Public Member Functions | Public Attributes | List of all members
lsst.pex.config.callStack.StackFrame Class Reference
Inheritance diagram for lsst.pex.config.callStack.StackFrame:

Public Member Functions

def __init__ (self, filename, lineno, function, content=None)
 
def content (self)
 
def fromFrame (cls, frame)
 
def __repr__ (self)
 
def format (self, full=False)
 

Public Attributes

 filename
 
 lineno
 
 function
 

Detailed Description

A single element of the stack trace

This differs slightly from the standard system mechanisms for
getting a stack trace by the fact that it does not look up the
source code until it is absolutely necessary, reducing the I/O.

Parameters
----------
filename : `str`
    Name of file containing the code being executed.
lineno : `int`
    Line number of file being executed.
function : `str`
    Function name being executed.
content : `str` or `None`
    The actual content being executed. If not provided, it will be
    loaded from the file.

Definition at line 73 of file callStack.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pex.config.callStack.StackFrame.__init__ (   self,
  filename,
  lineno,
  function,
  content = None 
)

Definition at line 94 of file callStack.py.

Member Function Documentation

◆ __repr__()

def lsst.pex.config.callStack.StackFrame.__repr__ (   self)

Definition at line 135 of file callStack.py.

◆ content()

def lsst.pex.config.callStack.StackFrame.content (   self)
Getter for content being executed

Load from file on demand.

Definition at line 104 of file callStack.py.

◆ format()

def lsst.pex.config.callStack.StackFrame.format (   self,
  full = False 
)
Format for printing

Parameters
----------
full : `bool`
    Print full details, including content being executed?

Returns
-------
result : `str`
    Formatted string.

Definition at line 138 of file callStack.py.

◆ fromFrame()

def lsst.pex.config.callStack.StackFrame.fromFrame (   cls,
  frame 
)
Construct from a Frame object

inspect.currentframe() provides a Frame object. This is
a convenience constructor to interpret that Frame object.

Parameters
----------
frame : `Frame`
    Frame object to interpret.

Returns
-------
output : `StackFrame`
    Constructed object.

Definition at line 114 of file callStack.py.

Member Data Documentation

◆ filename

lsst.pex.config.callStack.StackFrame.filename

Definition at line 98 of file callStack.py.

◆ function

lsst.pex.config.callStack.StackFrame.function

Definition at line 100 of file callStack.py.

◆ lineno

lsst.pex.config.callStack.StackFrame.lineno

Definition at line 99 of file callStack.py.


The documentation for this class was generated from the following file: