iode.Equations.merge_from

Equations.merge_from(input_file: str)

Merge all objects stored in the input file ‘input_file’ into the current database.

Parameters:
input_file: str

file from which the objects to merge are read.

Examples

>>> from iode import SAMPLE_DATA_DIR
>>> from iode import comments
>>> comments.load(f"{SAMPLE_DATA_DIR}/fun.cmt")
Loading .../fun.cmt
317 objects loaded
>>> len(comments)
317
>>> # delete all comments
>>> comments.clear()
>>> len(comments)
0
>>> # reload all comments
>>> comments.merge_from(f"{SAMPLE_DATA_DIR}/fun.cmt")
Loading ...\fun.cmt
317 objects loaded
>>> len(comments)
317