grapa.parse.curve_subclasses_utils.FileLoaderOnDemand
- class grapa.parse.curve_subclasses_utils.FileLoaderOnDemand(filename, call_index=None)
Bases:
objectA class to handle loading data from external files (e.g. configuration information, reference datasets), that we do not want to parse systematically at run-time, only once, on demand when actually needed. The instance can be called (), accessed by index [], and .get(“label abc”). Also, .labels() provide list of possible labels (or other key)
- __init__(filename, call_index=None)
filename: file where data are located call_index: call on object instance will return Object[call_index]
Methods
__init__(filename[, call_index])filename: file where data are located call_index: call on object instance will return Object[call_index]
get(value[, key])Returns the first Curve with key==value
labels([key])Returns the list of possible labels corresponding to each Curve in content
- get(value, key='label')
Returns the first Curve with key==value
- labels(key='label')
Returns the list of possible labels corresponding to each Curve in content