pastas.timer.SolveTimer.wrapattr#
- classmethod SolveTimer.wrapattr(stream, method, total=None, bytes=True, **tqdm_kwargs)#
stream : file-like object. method : str, “read” or “write”. The result of read() and
the first argument of write() should have a len().
>>> with tqdm.wrapattr(file_obj, "read", total=file_obj.size) as fobj: ... while True: ... chunk = fobj.read(chunk_size) ... if not chunk: ... break