line module
Define an object corresponding to a single line of the .dat.
- class DatLine(line, idx)[source]
Bases:
objectHold a single line of the
.datfile.- personalized_name
The name given by the user in the
.dat. The default is None.- Type:
str | None, optional
- splitted
The line divided into a list of arguments. It is used by LightWin to instantiate the
Instruction. Note that the name and the weight of the object are not present to keep the position of other arguments the same. To integrate them, callsplitted_full.
- property instruction: str
Return the command or element name.
Useful for
Instructioninstantiation.
- _split_named_elements(elements)[source]
Split elements into named and unnamed components.
- Parameters:
elements (
Collection[str])- Return type: