TQDM – a simpler progress bar
In Chapter 7, Fuzzy Hashing, we used the progressbar
module to track program progress for the user. And while the progressbar
module allows us to create a finely tuned progress bar, we can accomplish the same task in one line of code with tqdm
. The tqdm
module (version 3.4.0
) can create a progress bar with any Python iterator.
In the preceding example, we wrap an iterator created by range(100)
around tqdm
. That alone creates the progress bar displayed in the image. An alternative method, using the trange()
function, makes our task even simpler. We will use this module to create a progress bar for processing each WAL ...
Get Learning Python for Forensics now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.