Example #1
0
    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
Example #2
0
    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
Example #3
0
        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
Example #4
0
        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
Example #5
0
 def size_index_and_data_human(self):
     return util.human_bytesize(self.size_index_and_data)
Example #6
0
 def size_index_and_data_human(self):
     return util.human_bytesize(self.size_index_and_data)