parameters: (self, value)
docstring: Updates the progress bar to a new value.
docstring_summary: Updates the progress bar to a new value.
docstring_tokens: Updates the progress bar to a new value .
function: def update(self, value):
          "Updates the progress bar to a new value."
          assert 0 <= value <= self.maxval, '0 <= %d <= %d' % (value, self.maxval)
          self.currval = value
          if not self._need_update():
              return
          if self.start_time is None:
              raise RuntimeError('You must call start() before calling update()')
          now = time.time()
          self.seconds_elapsed = now - self.start_time
          self.next_update = self._next_update()
          self.fd.write(self._format_line() + '\r')
          self.last_update_time = now
function_tokens: def update ( self , value ) : assert 0 <= value <= self . maxval , '0 <= %d <= %d' % ( value , self . maxval ) self . currval = value if not self . _need_update ( ) : return if self . start_time is None : raise RuntimeError ( 'You must call start() before calling update()' ) now = time . time ( ) self . seconds_elapsed = now - self . start_time self . next_update = self . _next_update ( ) self . fd . write ( self . _format_line ( ) + '\r' ) self . last_update_time = now