adding a progress bar (tqdm)

This commit is contained in:
frankknoll
2023-03-16 21:54:43 +01:00
parent de2f698557
commit ccf00da0cd
2 changed files with 3 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ dependencies:
- nb_conda_kernels
- pillow
- openpyxl
- tqdm
# - python-decouple
# - selenium
# - webdriver-manager

View File

@@ -2,6 +2,7 @@ from PIL import Image, ImageDraw, ImageFont
import random
import string
import shutil
from tqdm import tqdm
class CaptchaGenerator:
@@ -15,9 +16,7 @@ class CaptchaGenerator:
def createAndSaveCaptchas(self):
self._prepareDataDir()
for i in range(self.numCaptchas):
# FK-TODO: use https://github.com/tqdm/tqdm
print(f'saving captcha {i+1}/{self.numCaptchas}')
for _ in tqdm(range(self.numCaptchas)):
self._createAndSaveCaptcha()
def _prepareDataDir(self):