Пример #1
0
 def clear(self):
     with self.lock:
         self.done = True
         if self.drawn:
             for meter in self.meters:
                 self.fp.write('\r')
                 self.fp.write(' ' * self.ncols)
                 self.fp.write('\r')
                 self.fp.write('\n')
             self.fp.write(_unicode(_term_move_up() * len(self.meters)))
Пример #2
0
 def draw(self):
     with self.lock:
         if (time.time() - self.creation_time) < self.delay_draw:
             return
         if self.done:
             return
         for meter in self.meters:
             tqdm.status_printer(self.fp)(meter)
             self.fp.write('\n')
         self.fp.write(_unicode(_term_move_up() * len(self.meters)))
         self.drawn = True
Пример #3
0
 def fp_write(s):
     fp.write(_unicode(s))
     fp_flush()