iode.Database.filename

Note

Below, Database represents either:

  • Comments

  • Equations

  • Identities

  • Lists

  • Scalars

  • Tables

  • Variables

Database.filename()

filename: str

Return the filepath associated with the current database.

Returns:
str

Examples

>>> from iode import SAMPLE_DATA_DIR
>>> from iode import comments
>>> from pathlib import Path
>>> from os.path import relpath
>>> comments.load(f"{SAMPLE_DATA_DIR}/fun.cmt")
>>> filepath = comments.filename
>>> Path(filepath).name
'fun.cmt'