tepkit.io.StructuredTextFile

tepkit.io.StructuredTextFile#

class tepkit.io.StructuredTextFile#

Bases: TextFile

The class for text file with special structure.

Properties#

lines

Methods#

from_string(→ tepkit.utils.typing_tools.Self)

Parse the string to structured data.

from_file(→ tepkit.utils.typing_tools.Self)

从文件中读取文本,然后调用 from_string 读取数据。

to_file(→ None)

Write the data of the object to a file.

All Members#

classmethod from_string(string: str) Self

Parse the string to structured data.

classmethod from_file(path: tepkit.utils.typing_tools.PathLike) Self

从文件中读取文本,然后调用 from_string 读取数据。

property lines
to_file(path) None

Write the data of the object to a file.