-
-
Notifications
You must be signed in to change notification settings - Fork 232
bar.text() in finalize is not effective #299
Copy link
Copy link
Closed
Description
I was trying to use bar.text() in finalize to print a success message when the iteration is done. Because the text gots cleaned right after the iteration is done, setting bar.text in finalize seems practically useless.
from time import sleep
from alive_progress import alive_it
bar = alive_it(
range(1000),
finalize=lambda bar: bar.text(f"{bar.current} items processed."),
)
for item in bar:
bar.text(f"Processing item {item}")
sleep(0.001)Is this expected behaviour or is there a parameter/approach I'm missing? If this is expected, I think
# from README.md
alive_it(items, finalize=lambda bar: bar.text('Success!'))should be updated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
