Keep Jupyter notebook running after closing browser tab

The simplest workaround to this seems to be the built-in cell magic %%capture:

%%capture output
# Time-consuming code here

Save, close tab, come back later. The output is now stored in the output variable:

output.show()

This will show all interim print results as well as the plain or rich output cell.

Leave a Comment

tech