def status_callback(i, n): tnow = time.time() if (tnow - tlast[0]) > 5 or i == n: print '%s / %s [%.1f%%]' % (util.human_bytesize(i), util.human_bytesize(n), i * 100.0 / n) tlast[0] = tnow
def status_callback(i, n): tnow = time.time() if (tnow - tlast[0]) > 5 or i == n: print '%s / %s [%.1f%%]' % ( util.human_bytesize(i), util.human_bytesize(n), i*100.0/n) tlast[0] = tnow
def status_callback(d): i = d['nread_bytes_all_files'] n = d['ntotal_bytes_all_files'] tnow = time.time() if n != 0 and ((tnow - tlast[0]) > 5 or i == n): print('%s / %s [%.1f%%]' % ( util.human_bytesize(i), util.human_bytesize(n), i*100.0/n)) tlast[0] = tnow
def status_callback(d): i = d['nread_bytes_all_files'] n = d['ntotal_bytes_all_files'] tnow = time.time() if n != 0 and ((tnow - tlast[0]) > 5 or i == n): print('%s / %s [%.1f%%]' % (util.human_bytesize(i), util.human_bytesize(n), i * 100.0 / n)) tlast[0] = tnow
def size_index_and_data_human(self): return util.human_bytesize(self.size_index_and_data)