iPython Notebook Print Above Last Line

不想你离开。 提交于 2019-12-13 02:09:49

问题


I have a notebook that is going to print off hundreds of lines. Is there anyway to have the next line print above the last one?

As in:

Output_n    
...
Output 2
Output 1

Instead of:

Output1
Output2
...
Output_n

回答1:


Kind of! from IPython.display import clear_output, then calling clear_output() will clear everything. Then you reprint everything starting from Output_n. It's... not ideal.

Here's a link.



来源:https://stackoverflow.com/questions/24439629/ipython-notebook-print-above-last-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!