最后一行的iPython笔记本打印 [英] iPython Notebook Print Above Last Line

查看:206
本文介绍了最后一行的iPython笔记本打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台笔记本打算打印几百行。反正是否有下一行打印在最后一行之上?

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?

如下:

Output_n    
...
Output 2
Output 1

而不是:

Output1
Output2
...
Output_n


推荐答案

有点儿!来自IPython.display的导入clear_output ,然后调用 clear_output()将清除所有内容。然后你重新打印从Output_n开始的一切。这是......不理想。

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.

这是一个链接。

这篇关于最后一行的iPython笔记本打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆