Source code for alphatwirl.progressbar.ProgressMonitor
# Tai Sakuma <tai.sakuma@cern.ch>
from .ProgressReporter import ProgressReporter
##__________________________________________________________________||
[docs]class Queue(object):
def __init__(self, presentation):
self.presentation = presentation
[docs] def put(self, report):
self.presentation.present(report)
##__________________________________________________________________||
[docs]class ProgressMonitor(object):
def __init__(self, presentation):
self.queue = Queue(presentation = presentation)
[docs] def createReporter(self):
reporter = ProgressReporter(self.queue)
return reporter
##__________________________________________________________________||