def __init__(self,
                 total,
                 prefix='',
                 suffix='',
                 decimals=0,
                 bar_length=60,
                 keep_alive=False,
                 display_time=False):
        """
        Creates a new progress bar using the given information.
        :param total:                       The total number of iteration for this progress bar.
        :param prefix:                      [Optional] The text that should be displayed at the left side of the
                                            progress bar. Note that progress bars will always stay left-aligned at the
                                            shortest possible.
        :param suffix:                      [Optional] The text that should be displayed at the very right side of the
                                            progress bar.
        :param decimals:                    [Optional] The number of decimals to display for the percentage.
        :param bar_length:                  [Optional] The graphical bar size displayed on screen. Unit is character.
        :param keep_alive:                  [Optional] Specify whether the progress bar should stay displayed forever
                                            once completed or if it should vanish.
        :param display_time:                [Optional] Specify whether the duration since the progress has begun should
                                            be displayed. Running time will be displayed between parenthesis, whereas it
                                            will be displayed between brackets when the progress has completed.
        """
        super(TaskProgress, self).__init__()

        self.progress = 0

        # Minimum number of seconds at maximum completion before a progress bar is removed from display
        # The progress bar may vanish at a further time as the redraw rate depends upon chrono AND method calls
        self.timeout_chrono = None
        self.begin_time = None
        self.end_time = None
        self.elapsed_time_at_end = None

        # Graphics related information
        self.keep_alive = keep_alive
        self.display_time = display_time

        self.total = total
        self.prefix = prefix
        self.suffix = suffix
        self.decimals = decimals
        self.bar_length = bar_length
def __init__ ( self , total , prefix = '' , suffix = '' , decimals = 0 , bar_length = 60 , keep_alive = False , display_time = False ) : super ( TaskProgress , self ) . __init__ ( ) self . progress = 0 self . timeout_chrono = None self . begin_time = None self . end_time = None self . elapsed_time_at_end = None self . keep_alive = keep_alive self . display_time = display_time self . total = total self . prefix = prefix self . suffix = suffix self . decimals = decimals self . bar_length = bar_length
Creates a new progress bar using the given information.
        :param total:                       The total number of iteration for this progress bar.
        :param prefix:                      [Optional] The text that should be displayed at the left side of the
                                            progress bar. Note that progress bars will always stay left-aligned at the
                                            shortest possible.
        :param suffix:                      [Optional] The text that should be displayed at the very right side of the
                                            progress bar.
        :param decimals:                    [Optional] The number of decimals to display for the percentage.
        :param bar_length:                  [Optional] The graphical bar size displayed on screen. Unit is character.
        :param keep_alive:                  [Optional] Specify whether the progress bar should stay displayed forever
                                            once completed or if it should vanish.
        :param display_time:                [Optional] Specify whether the duration since the progress has begun should
                                            be displayed. Running time will be displayed between parenthesis, whereas it
                                            will be displayed between brackets when the progress has completed.