def _setup_progressbar(self):
        count_query_string = 'SELECT count(*) AS count from %s' % self.table_name
        # Count the rows in the table.
        self.row_count = self.cursor.execute(count_query_string).fetchone()['count']
        assert self.row_count > 0, "Row count for table %s is 0." % self.table_name
        # Every N number of iterations, update the progress bar. Do this
        # relative to query size.
        self.progress_update_interval = max(1, self.row_count / 100)
        # No more than 1000. Give the user more frequent updates.
        self.progress_update_interval = min(500, self.progress_update_interval)

        bar_label = " - %s: " % self.table_name
        widgets = [bar_label,
                   Percentage(), ' ', Bar(marker='=', left='[', right=']'),
                   ' ', ETA()]
        self.pbar = ProgressBar(widgets=widgets, maxval=self.row_count)
        self.pbar.start()
Instantiates and configures the ProgressBar for the importer.
dataset/ETHPy150Open gtaylor/django-eve-db/eve_db/ccp_importer/importers/importer_classes.py/SQLImporter._setup_progressbar