Show and output the progress message. :param current: Set the current percentage. [None] :param increase: Increase the current percentage. [None] :param info: Array of strings to be formatted with msg. [None]
(self, current=None, increase=1, info=None)
| 71 | return pct |
| 72 | |
| 73 | def show(self, current=None, increase=1, info=None): |
| 74 | """ |
| 75 | Show and output the progress message. |
| 76 | |
| 77 | :param current: Set the current percentage. [None] |
| 78 | :param increase: Increase the current percentage. [None] |
| 79 | :param info: Array of strings to be formatted with msg. [None] |
| 80 | """ |
| 81 | pct = self.progress(current, increase) |
| 82 | if pct is not None: |
| 83 | if info is not None: |
| 84 | return self.output(self.msg % tuple([pct] + info), info=info) |
| 85 | else: |
| 86 | return self.output(self.msg % pct) |
| 87 | |
| 88 | def output(self, message, info=None): |
| 89 | j = self.make_json(message=message, current=self.counter, total=self.total, info=info) |