code: def progress_status(self):
          
  
          if self.line % self.freq == 0:
              text = self.statustext.format(nele=self.line,
                                            totalele=self.total_lines)
  
              if self.main_window.grid.actions.pasting:
                  try:
                      post_command_event(self.main_window,
                                         self.main_window.StatusBarMsg,
                                         text=text)
                  except TypeError:
                      # The main window does not exist any more
                      pass
              else:
                  # Write directly to the status bar because the event queue
                  # is not emptied during file access
  
                  self.main_window.GetStatusBar().SetStatusText(text)
  
              # Now wait for the statusbar update to be written on screen
              if is_gtk():
                  try:
                      wx.Yield()
                  except:
                      pass
  
          self.line += 1
docs: Displays progress in statusbar