在单元格运行时更改ipython中的输出

时间:2017-01-16 01:51:47

标签: python ipython jupyter-notebook

是否可以让ipython执行以下操作?

#A cell...
output("a") # the cell output shows "a"
change_output("b") # the cell output now shows "b". "a" has been deleted

我想要这种行为,以便单元格输出可以显示当前运行状态而没有大量输出行。

1 个答案:

答案 0 :(得分:1)

是的,就像这样:

initialModel