Closed dr-dark-flames closed 1 year ago
alive_bar
isn't even used there. Please provide your full code or context.
def convert(path):
output = r"\converted"
if not os.path.exists(path + output):
os.mkdir(path + output)
with alive_bar(0) as bar:
for filename in os.listdir(path):
if filename.endswith(".png") and filename[:-4] not in os.listdir(path + output):
png_img = cv2.imread(os.path.join(path, filename))
new_file = os.path.join(path + output, f'{filename.strip(".png")}.jpg')
cv2.imwrite(new_file, png_img, [int(cv2.IMWRITE_JPEG_QUALITY), 100])
time.sleep(0.0001)
bar()
What problem are you having with it?
What problem are you having with it?
Whenever I run the code the bar doesnt appear until the code is done and the bar appears finished and done.
What are you using to run the program? Jupyter Notebook, Pycharm, Windows terminal, Command Prompt,...?
Pycharm
Does #173 answer your question?
Thanks @TheTechRobo! Yep, pycharm does not emulate a terminal by default, thus alive-progress cannot draw itself.
I see, thanks a lot it worked!
This is a simple function that I've been trying to add alive_bar to but never succeeded. Please help.