iode.Database.load

Note

Below, Database represents either:

  • Comments

  • Equations

  • Identities

  • Lists

  • Scalars

  • Tables

  • Variables

Database.load(self, filepath: str)

Load objects stored in file ‘filepath’ into the current database. Erase the database before to load the file.

Parameters:
filepath: str

path to the file to load

Examples

>>> from iode import SAMPLE_DATA_DIR
>>> from iode import comments, variables
>>> comments.load(f"{SAMPLE_DATA_DIR}/fun.cmt")
>>> len(comments)
317
>>> variables.load(f"{SAMPLE_DATA_DIR}/fun.var")
>>> len(variables)
394