MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / tqdm

Class tqdm

pager_lib/tqdm/std.py:244–1519  ·  view source on GitHub ↗

Decorate an iterable object, returning an iterator which acts exactly like the original iterable, but prints a dynamically updating progressbar every time a value is requested. Parameters ---------- iterable : iterable, optional Iterable to decorate with a progress

Source from the content-addressed store, hash-verified

242
243
244class tqdm(Comparable):
245 """
246 Decorate an iterable object, returning an iterator which acts exactly
247 like the original iterable, but prints a dynamically updating
248 progressbar every time a value is requested.
249
250 Parameters
251 ----------
252 iterable : iterable, optional
253 Iterable to decorate with a progressbar.
254 Leave blank to manually manage the updates.
255 desc : str, optional
256 Prefix for the progressbar.
257 total : int or float, optional
258 The number of expected iterations. If unspecified,
259 len(iterable) is used if possible. If float("inf") or as a last
260 resort, only basic progress statistics are displayed
261 (no ETA, no progressbar).
262 If `gui` is True and this parameter needs subsequent updating,
263 specify an initial arbitrary large positive number,
264 e.g. 9e9.
265 leave : bool, optional
266 If [default: True], keeps all traces of the progressbar
267 upon termination of iteration.
268 If `None`, will leave only if `position` is `0`.
269 file : `io.TextIOWrapper` or `io.StringIO`, optional
270 Specifies where to output the progress messages
271 (default: sys.stderr). Uses `file.write(str)` and `file.flush()`
272 methods. For encoding, see `write_bytes`.
273 ncols : int, optional
274 The width of the entire output message. If specified,
275 dynamically resizes the progressbar to stay within this bound.
276 If unspecified, attempts to use environment width. The
277 fallback is a meter width of 10 and no limit for the counter and
278 statistics. If 0, will not print any meter (only stats).
279 mininterval : float, optional
280 Minimum progress display update interval [default: 0.1] seconds.
281 maxinterval : float, optional
282 Maximum progress display update interval [default: 10] seconds.
283 Automatically adjusts `miniters` to correspond to `mininterval`
284 after long display update lag. Only works if `dynamic_miniters`
285 or monitor thread is enabled.
286 miniters : int or float, optional
287 Minimum progress display update interval, in iterations.
288 If 0 and `dynamic_miniters`, will automatically adjust to equal
289 `mininterval` (more CPU efficient, good for tight loops).
290 If > 0, will skip display of specified number of iterations.
291 Tweak this and `mininterval` to get very efficient loops.
292 If your progress is erratic with both fast and slow iterations
293 (network, skipping items, etc) you should set miniters=1.
294 ascii : bool or str, optional
295 If unspecified or False, use unicode (smooth blocks) to fill
296 the meter. The fallback is to use ASCII characters " 123456789#".
297 disable : bool, optional
298 Whether to disable the entire progressbar wrapper
299 [default: False]. If set to None, disable on non-TTY.
300 unit : str, optional
301 String that will be used to define the unit of each iteration

Callers 5

infoCBMethod · 0.90
openCBMethod · 0.90
trangeFunction · 0.70
mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected