File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22from .tools .odmlparser import ODMLReader , ODMLWriter
33
44
5- def load (filename , backend = "xml" ):
5+ def load (filename , backend = "xml" , show_warnings = True ):
66 """
77 Load an odML document from file.
88 :param filename: Path and filename from where the odML document
99 is to be loaded and parsed.
1010 :param backend: File format of the file containing the odML document.
1111 The default format is XML.
12+ :param show_warnings: Toggle whether to print warnings to the command line.
1213 :return: The parsed odML document.
1314 """
1415 if not os .path .exists (filename ):
1516 msg = "File \' %s\' was not found!" % \
1617 (filename if len (filename ) < 20 else "...%s" % filename [19 :])
1718 raise FileNotFoundError (msg )
1819
19- reader = ODMLReader (backend )
20+ reader = ODMLReader (backend , show_warnings )
2021 return reader .from_file (filename )
2122
2223
You can’t perform that action at this time.
0 commit comments