/** * @file XListView.java * @package me.maxwin.view * @create Mar 18, 2012 6:28:41 PM * @author Maxwin * @descr iption An ListView support (a) Pull down to refresh, (b) Pull up to load more. * Implement IXListViewListener, and see stopRefresh() / s
python动态进度条的实现代码,具体内容如下所示:
有时候我们需要使用print打印工作进度,正常使用print函数会导致刷屏的现象,举个最简单的例子,从1打印到10,每次停顿0.1秒
这样看起来很麻烦,有没有办法实现动态的进度显示呢?我们可以使用’\r’,这个命令可以使光标重新返回头部,之后设置end=”,取消python的打印自动换行的功能
import time
for i in range(10):
print('\r比例' ,i/10,end='')
time.sleep