python3.x - 请问大神如何适用python制作能够实时刷新的命令行图形工具?
迷茫
迷茫 2017-04-18 10:14:56
0
2
477

小弟想实现,在linux的命令行中显示能够实时刷新(因为只能用xshell等终端工具,且无法使用图形化工具),变化展现内容的命令行工具,例子效果如下:

界面中可以按照每2秒进行一次刷新,并展示最新内容。另外类似的如nmon的图形界面
请问python如何能实现类似的功能呢?谢谢大家!

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
大家讲道理

用curses,Curses Programming with Python。

巴扎黑

Another way is to write down the bytes you output before, then output the backspace character to delete them all, and then output again.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!