finesse.script.legacy.KatParser.parse_file¶
- KatParser.parse_file(path, model=None, **kwargs)[source]¶
Parse kat code from a file into a model.
- Parameters
path : str or
io.FileIO
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.
model :
Model
, optionalModel object to add components to. If not specified, a new model will be created.
- Other Parameters
**kwargs
Keyword parameters supported by
parse()
.- Raises
-
If an error occurs during parsing or building.