EndfParserBase
- class endf_parserpy.EndfParserBase[source]
Bases:
ABCAbstract base class for ENDF parsers.
This abstract base class defines the basic interface that must be provided by ENDF parser classes, such as
EndfParserPyandEndfParserCpp. Therefore, any ENDF parser class should be derived from this abstract base class.A parser is picklable: it is pickled by recipe – the arguments it was constructed with – and rebuilt by re-running
__init__on unpickling. A subclass must decorate its__init__with_record_init_kwargs()for this to work.- abstract parse(lines: str | List[str], exclude: Tuple[int | Tuple[int, int]] | None = None, include: Tuple[int | Tuple[int, int]] | None = None) Dict[int, Dict[int, Dict[str, dict | list | int | float | str] | List[str]]][source]
- abstract parsefile(filename: str, exclude: Tuple[int | Tuple[int, int]] | None = None, include: Tuple[int | Tuple[int, int]] | None = None) Dict[int, Dict[int, Dict[str, dict | list | int | float | str] | List[str]]][source]