+import sys\r
+\r
+class ProgressBar(object):\r
+ def __init__(self, full):\r
+ self.full = full\r
+ self.count = 0\r
+\r
+ self.print_bar(0)\r
+\r
+ def print_bar(self, progress):\r
+ sys.stdout.write("[%s%s] %d%%\r" % ('=' * progress, ' ' * (100 - progress), progress))\r
+ sys.stdout.flush()\r
+\r
+ def update(self):\r
+ self.count += 1\r
+ self.print_bar(int((float(self.count) / float(self.full)) * 100))
\ No newline at end of file