finesse.model.Model.parse_file

Model.parse_file(path, spec=None)[source]

Parses kat script from a file and adds the resulting objects to the model.

Parameters
pathstr, pathlib.Path, or file-like

The path or file object to read kat script from. If an open file object is passed, it will be read from and left open. If a path is passed, it will be opened, read from, then closed.

specKatSpec, optional

The language specification to use. Defaults to the shared KatSpec instance.

See also

parse

Parse script.

parse_legacy

Parse Finesse 2 kat script.

parse_legacy_file

Parse Finesse 2 kat script file.