Ask Your Question

Revision history [back]

click to hide/show revision 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.