Ejemplo n.º 1
0
 def __init__(self, term_file):
     TextProgressView.__init__(self, term_file)
     # The TextProgressView does not show the transport activity untill
     # there was a progress update. This changed becuse showing the
     # transport activity before a progress update would cause artifactes to
     # remain on the screen. We don't have to worry about that
     self._have_output = True
Ejemplo n.º 2
0
 def __init__(self, time_source, writer, interval):
     """See `LoggingUIFactory.__init__` for descriptions of the parameters.
     """
     # If anything refers to _term_file, that's a bug for us.
     TextProgressView.__init__(self, term_file=None)
     self._writer = writer
     self.time_source = time_source
     if writer is None:
         self.write = sys.stdout.write
     else:
         self.write = writer
     # _transport_expire_time is how long to keep the transport activity in
     # the progress bar for when show_progress is called.  We opt for
     # always just showing the task info.
     self._transport_expire_time = 0
     # We repaint only after 'interval' seconds whether we're being told
     # about task progress or transport activity.
     self._update_repaint_frequency = interval
     self._transport_repaint_frequency = interval
Ejemplo n.º 3
0
 def __init__(self, time_source, writer, interval):
     """See `LoggingUIFactory.__init__` for descriptions of the parameters.
     """
     # If anything refers to _term_file, that's a bug for us.
     TextProgressView.__init__(self, term_file=None)
     self._writer = writer
     self.time_source = time_source
     if writer is None:
         self.write = sys.stdout.write
     else:
         self.write = writer
     # _transport_expire_time is how long to keep the transport activity in
     # the progress bar for when show_progress is called.  We opt for
     # always just showing the task info.
     self._transport_expire_time = 0
     # We repaint only after 'interval' seconds whether we're being told
     # about task progress or transport activity.
     self._update_repaint_frequency = interval
     self._transport_repaint_frequency = interval
Ejemplo n.º 4
0
 def make_view_only(self, out, width=79):
     view = TextProgressView(out)
     view._avail_width = lambda: width
     return view
Ejemplo n.º 5
0
 def make_view_only(self, out, width=79):
     view = TextProgressView(out)
     view._avail_width = lambda: width
     return view