Tqdm
-
Description: This is a custom progress bar derived from
tqdm
to display a progress bar during the iteration process of an iterable. The modification made to the originaltqdm
is with thetotal
parameter. When the user does not specifytotal
, the length of theiterable
is automatically calculated and set astotal
. This design ensures that the progress bar is correctly displayed without requiring the user to manually settotal
. -
Parameters
- iterable (
Iterable
): The object to iterate over. - desc (
str
): A description for the progress bar. - smoothing (
int
): The smoothing parameter. - kwargs (
Any
): Other parameters.
- iterable (
-
Example
import capybara as cb
for i in cb.Tqdm(range(100), desc='Processing'):
pass