I was hoping that as a trick to work around this present flaw, you could use the %%capture out
magic on the long running cell to collect a pure output stream and not contaminate the other cells out streams. I explain it here; you can just ignore the %store
information if you want to display it in the notebook.
However, testing it, I found the %%capture
didn’t contain it. But you can keep the output from the other cell isolated from the long running output using %%capture
for the normal cell. And then show the output of the normal cell (print()
in your example) in another cell with:
import sys
sys.stdout.write(out.stdout);