def __iter__(self):
    last_progress = None
    for (index, chunk) in enumerate(self.groups):
        if (self.aprox_chunks == 0):
            index = self.aprox_chunks
        units = progress_units(index, self.aprox_chunks)
        progress = human_readable_progress((index * self.chunk_size), self.totalsize)
        if (last_progress != units):
            print_progress(self.output, units, progress)
            last_progress = units
        (yield chunk)
    progress = human_readable_progress(self.totalsize, self.totalsize)
    print_progress(self.output, progress_units(100, 100), progress)
def __iter__(self):
    last_progress = None
    for (index, chunk) in enumerate(self.groups):
        if (self.aprox_chunks == 0):
            index = self.aprox_chunks
        units = progress_units(index, self.aprox_chunks)
        progress = human_readable_progress((index * self.chunk_size), self.totalsize)
        if (last_progress != units):
            print_progress(self.output, units, progress)
            last_progress = units
        (yield chunk)
    progress = human_readable_progress(self.totalsize, self.totalsize)
    print_progress(self.output, progress_units(100, 100), progress)