就是类似显示进度条那样子的显示方式 只不过要求多行的
用了sys.stdout.flush()来弄 只能显示单行 可以做到多行的效果吗?
用了sys.stdout.flush()来弄 只能显示单行 可以做到多行的效果吗?
1
lzachilles Jun 11, 2015 ncursor
|
2
rudy1224 Jun 11, 2015 http://www.zhihu.com/question/21100416
Unix平台下用python标准库里边自带的Curses, Windows下可以用Console。 试了一下(windows 8.1, python 2.7): import Console import time c = Console.getconsole() c.title("myprint") # 输出到指定位置 for i in xrange(1000): c.text(0, 0, str(i)) c.text(0, 1, str(i+1)) time.sleep(0.1) 得到的是这样: ![]() |
3
aec4d Jun 11, 2015
和我这2天关注的需求一样~~这里有个不错的案例https://github.com/aaren/multi_progress
|