SELKIELogger  1.0.0
SELKIELogger.SLFiles.VarFile Class Reference

Represent a channel mapping (.var) file, caching information as necessary. More...

Public Member Functions

def __init__ (self, filename)
 Create VarFile instance. More...
 
def getSourceMap (self, force=False)
 Get source/channel map from file, or return from cache if available. More...
 
def printSourceMap (self, fancy=True)
 Print a source/channel map, optionally using the tools provided in the "rich" package to provide a prettier output. More...
 

Private Attributes

 _fn
 File name and path.
 
 _sm
 Source/Channel Map.
 

Detailed Description

Represent a channel mapping (.var) file, caching information as necessary.

Definition at line 34 of file SLFiles.py.

Constructor & Destructor Documentation

◆ __init__()

def SELKIELogger.SLFiles.VarFile.__init__ (   self,
  filename 
)

Create VarFile instance.

Does not open or parse file.

Parameters
filenameFile name and path

Definition at line 37 of file SLFiles.py.

Member Function Documentation

◆ getSourceMap()

def SELKIELogger.SLFiles.VarFile.getSourceMap (   self,
  force = False 
)

Get source/channel map from file, or return from cache if available.

Parameters
forceRead file again, even if source map exists
Returns
SLSourceMap instance

Definition at line 47 of file SLFiles.py.

◆ printSourceMap()

def SELKIELogger.SLFiles.VarFile.printSourceMap (   self,
  fancy = True 
)

Print a source/channel map, optionally using the tools provided in the "rich" package to provide a prettier output.

Falls back to standard print output if fancy is False or if the rich package is not installed.

Parameters
fancyEnable/disable use of rich features.
Returns
None

Definition at line 70 of file SLFiles.py.


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