Source code for alphatwirl.progressbar.ProgressMonitor
# Tai Sakuma <tai.sakuma@gmail.com>
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(queue = self.queue)
return reporter
##__________________________________________________________________||