some beautification

This commit is contained in:
Miroslav Stampar 2010-03-12 13:07:07 +00:00
parent 7ec04281dd
commit 15c638ac52

View File

@ -201,7 +201,8 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
output = '...' + output[3:]
if endCharIndex - startCharIndex == conf.progressWidth:
output = output[:-3] + '...'
status = ' %d/%d' % (count, length)
output += '_' * (min(length, conf.progressWidth) - len(output))
status = ' %d/%d (%d%s)' % (count, length, round(100.0*count/length), '%')
output += status if count != length else " "*len(status)
iolock.acquire()
dataToStdout("\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), output))