| 1 | initial version |
In python, there is no easy way to catch the printed output of a function. I don't know if there is a hard way to do it in the notebook :)
In your case, you can't easily intercept the output of MixedIntegerLinearProgram.show(). str(p) will return a string representation (rather than printing it) of your MIP, which you can write to a file.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.