sys-bio/simplesbml

Warnings should not use print()

Closed this issue · 0 comments

0u812 commented

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)