pypet/pypetlogging.py
def show_progress(self, n, total_runs):
        """Displays a progressbar"""
        if self.report_progress:
            percentage, logger_name, log_level = self.report_progress
            if logger_name == 'print':
                logger = 'print'
            else:
                logger = logging.getLogger(logger_name)

            if n == -1:
                # Compute the number of digits and avoid log10(0)
                digits = int(math.log10(total_runs + 0.1)) + 1
                self._format_string = 'PROGRESS: Finished %' + '%d' % digits + 'd/%d runs '

            fmt_string = self._format_string % (n + 1, total_runs) + '%s'
            reprint = log_level == 0
            progressbar(n, total_runs, percentage_step=percentage,
                        logger=logger, log_level=log_level,
                        fmt_string=fmt_string, reprint=reprint)
def show_progress(self, n, total_runs):
        if self.report_progress:
            percentage, logger_name, log_level = self.report_progress
            if logger_name == 'print':
                logger = 'print'
            else:
                logger = logging.getLogger(logger_name)

            if n == -1:
                # Compute the number of digits and avoid log10(0)
                digits = int(math.log10(total_runs + 0.1)) + 1
                self._format_string = 'PROGRESS: Finished %' + '%d' % digits + 'd/%d runs '

            fmt_string = self._format_string % (n + 1, total_runs) + '%s'
            reprint = log_level == 0
            progressbar(n, total_runs, percentage_step=percentage,
                        logger=logger, log_level=log_level,
                        fmt_string=fmt_string, reprint=reprint)
def show_progress ( self , n , total_runs ) : if self . report_progress : percentage , logger_name , log_level = self . report_progress if logger_name == 'print' : logger = 'print' else : logger = logging . getLogger ( logger_name ) if n == - 1 : # Compute the number of digits and avoid log10(0) digits = int ( math . log10 ( total_runs + 0.1 ) ) + 1 self . _format_string = 'PROGRESS: Finished %' + '%d' % digits + 'd/%d runs ' fmt_string = self . _format_string % ( n + 1 , total_runs ) + '%s' reprint = log_level == 0 progressbar ( n , total_runs , percentage_step = percentage , logger = logger , log_level = log_level , fmt_string = fmt_string , reprint = reprint )
Displays a progressbar
Displays a progressbar