def _setup_bar(self):
bar = u"<STR_LIT>"<EOL>items_cnt = len(PROGRESS_BAR_ITEMS)<EOL>bar_val = float(self._time_left) / self._section_time * self.num_progress_bars<EOL>while bar_val > <NUM_LIT:0>:<EOL><INDENT>selector = int(bar_val * items_cnt)<EOL>selector = min(selector, items_cnt - <NUM_LIT:1>)<EOL>bar += PROGRESS_BAR_ITEMS[selector]<EOL>bar_val -= <NUM_LIT:1><EOL><DEDENT>bar = bar.ljust(self.num_progress_bars)<EOL>return bar<EOL>
Setup the process bar.