Way to programmatically clear last println() statement in Jupyter cell?

Is there a way to remove the output of a Jupyter cell (equivalent of what gets done when you run the cell for the first time)?

This would allow you to use println(...) and the like inside @manipulate clauses

Otherwise you get something like:

// note: this only gets worse for bigger text blocks

Addressed in https://github.com/JuliaLang/IJulia.jl#clearing-output

Just had to add:

  • IJulia.clear_output(true)

before the println(...)


Adding IJulia.clear_output(true) doesn’t seem to work anymore because the controls also get cleared. Does anyone know any other workaround?