• Home
  • Raw
  • Download

Lines Matching full:progress

6 """Operation, including output and progress display
8 This module implements the concept of an operation, which has regular progress
47 """Wrapper around long running functions to show progress.
50 the output, and display a progress bar.
52 To display a progress bar for a function foo with argument foo_args, this is
65 # By default, update the progress bar every 100 ms.
87 def ProgressBar(self, progress): argument
88 """This method creates and displays a progress bar.
90 If not in a terminal, we do not display a progress bar.
93 progress: a float between 0 and 1 that represents the fraction of the
94 current progress.
99 progress = max(0.0, min(1.0, progress))
102 block = int(width * progress)
105 text = '\r [%s%s] %d%%' % (shaded, unshaded, progress * 100)
116 """Method to cleanup progress bar.
118 If progress bar has been printed, then we make sure it displays 100% before
127 """Method to parse output and update progress bar.
133 increment the progress bar every time foo is seen.
138 # Increment progress bar.
180 """Run func, parse its output, and update the progress bar.
193 # If we are not running in a terminal device, do not display the progress
219 # Before we exit, parse the output again to update progress bar.
221 # Final sanity check to update the progress bar to 100% if it was used
226 # touching the progress bar.
250 """Message to be shown before the progress bar is displayed with 0%.
252 The message is not displayed if the progress bar is not going to be
258 """Parse the output of emerge to determine how to update progress bar.
261 built is zero, then we do not display the progress bar.
264 can determine how much to update the progress bar by.
271 A fraction between 0 and 1 indicating the level of the progress bar. If
272 the progress bar isn't displayed, then the return value is -1.
294 progress = self._completed / self._total
295 self.ProgressBar(progress)
296 return progress
307 """Class which controls stdio and progress of an operation in progress.
310 it looking for errors and progress information. Optionally it can output the
313 Progress information is garnered from the subprocess output based on
315 real progress information reported through new python methods which will
319 as it reports progress.
328 progress: True / False
330 try to present progress information to the user.
349 self.progress = True # True to report progress of the operation
351 self._update_len = 0 # Length of last progress update message.
375 This finishes any output line currently in progress and resets the color
420 """Filter a line of output to look for and dispay progress information.
422 This uses a simple regular expression search to spot progress information
435 """Record and optionally display progress information.
444 if self.progress:
445 # Finish the current line, print progress, and remember its length.
448 # Sometimes the progress string shrinks and in this case we need to
461 We also handle removing progress messages from the output. This is done
467 we must clean up any remaining progress message by overwriting
472 # If out last output line was shorter than the progress info
483 # enough to overwrite all the progress information we have sent, add some
554 do_output_filter: True to look through output for errors and progress.
569 # If we now have a whole line, check it for errors and progress.