| 263 | from tqdm import tqdm |
| 264 | |
| 265 | class TqdmProgress(tqdm): |
| 266 | def __init__(self, *args, **kwargs): |
| 267 | kwargs['total'] = 100 |
| 268 | super(TqdmProgress, self).__init__(*args, **kwargs) |
| 269 | |
| 270 | def progress(self, cur, max): |
| 271 | new_n = cur / max * self.total |
| 272 | self.update(new_n - self.n) |
| 273 | return True |
| 274 | |
| 275 | except ImportError: |
| 276 | # Stub class |