Register
- class Register(previous=None, next=None, data=None)[source]
Class for a generic register in a textfile, with a given identifier which is located at the beginning of the line.
- classmethod matches(line: str | bytes, storage: str = '')[source]
Checks if the current line matches the identifier of the register.
- read(file: IO, storage: str = '', *args, **kwargs) bool [source]
Generic function to perform the reading of the register using a filepointer.
- Parameters:
file (IO) – The filepointer
- Returns:
The success, or not, in the reading
- Return type:
- read_register(file: IO, storage: str = '', *args, **kwargs)[source]
Function that reads the register and evaluates the result.
- Parameters:
file (IO) – The filepointer
DefaultRegister
- class DefaultRegister(previous=None, next=None, data=None)[source]
A class for representing a default register, which contains exactly the data from the read line. Mainly used for comments.