diff --git a/odml/fileio.py b/odml/fileio.py index 2d095bd5..d9e52695 100644 --- a/odml/fileio.py +++ b/odml/fileio.py @@ -2,13 +2,14 @@ from .tools.odmlparser import ODMLReader, ODMLWriter -def load(filename, backend="xml"): +def load(filename, backend="xml", show_warnings=True): """ Load an odML document from file. :param filename: Path and filename from where the odML document is to be loaded and parsed. :param backend: File format of the file containing the odML document. The default format is XML. + :param show_warnings: Toggle whether to print warnings to the command line. :return: The parsed odML document. """ if not os.path.exists(filename): @@ -16,7 +17,7 @@ def load(filename, backend="xml"): (filename if len(filename) < 20 else "...%s" % filename[19:]) raise FileNotFoundError(msg) - reader = ODMLReader(backend) + reader = ODMLReader(backend, show_warnings) return reader.from_file(filename)