sys-bio / simplesbml

Python package for building SBML models without needing to use libSBML.
http://simplesbml.readthedocs.io/en/latest/
MIT License
10 stars 12 forks source link

Warnings should not use print() #24

Closed 0u812 closed 3 years ago

0u812 commented 8 years ago

The following code causes warnings to be emitted by the print (statment I think) inside the simplesbml model. These warnings should be emitted by the Python warnings module.

import roadrunner

import simplesbml
model = simplesbml.sbmlModel();
model.addSpecies('X', 3.0);
model.addSpecies('Y', 3);
model.addSpecies('$A', 0.5);
model.addSpecies('$B', 3.0);
model.addSpecies('$E', 3.0);

model.addParameter ('k1', 1.12298)
model.addParameter ('k2', 0.633134)
model.addParameter ('k3', 0.767529)
model.addParameter ('k4', 1.02339)

model.addReaction(['A'], ['X'], 'k1*A', rxn_id='J1');
model.addReaction(['2 X', 'Y'], ['3 X'], 'k2*X^2*Y', rxn_id='J2');
model.addReaction(['X', 'B'], ['Y'], 'k3*X*B', rxn_id='J3');
model.addReaction(['X'], ['E'], 'k4*X', rxn_id='J4');

print(model)