new_contents: # -*- coding:utf-8 -*-
  
  import sys, time
  
  class ProgressBar:
      def __init__(self, count = 0, total = 0, width = 50):
          self.count = count
          self.total = total
          self.width = width
      def move(self):
          self.count += 1
      def log(self, s):
          sys.stdout.write(' ' * (self.width + 9) + '\r')
          sys.stdout.flush()
          print s
          progress = self.width * self.count / self.total
          sys.stdout.write('%3d/%3d: \r' % (self.count, self.total))
          if progress == self.width:
              sys.stdout.write('\n')
          sys.stdout.flush()
  
  bar = ProgressBar(total = 10)
  for i in range(10):
      bar.move()
      bar.log('We have arrived at: ' + str(i + 1))
      time.sleep(1)
  
subject: Create progressbar-python.py