Echos (and in the process, pretty prints) an SBML model.
49 """usage: echoSBML.py input-filename output-filename 58 if not os.path.exists(infile):
59 print(
"[Error] %s : No such file." % infile)
64 sbmldoc = reader.readSBML(infile)
66 if sbmldoc.getNumErrors() > 0:
67 if sbmldoc.getError(0).getErrorId() == libsbml.XMLFileUnreadable:
70 elif sbmldoc.getError(0).getErrorId() == libsbml.XMLFileOperationError:
79 writer.writeSBML(sbmldoc, outfile)
80 print(
"[OK] Echoed %s to %s" % (infile, outfile))
82 if __name__ ==
'__main__':