+
+ def progress_callback(self, ev, eh, buf, array):
+ position = array[2]
+ total = array[3]
+
+ if self.progress_bar is None:
+ self.progress_bar = progress_generator(total)
+ self.progress_bar.next()
+
+ self.progress_bar.send(position)
+
+ if position == total:
+ self.progress_bar = None