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.
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, settingbar.textin finalize seems practically useless.Is this expected behaviour or is there a parameter/approach I'm missing? If this is expected, I think
should be updated.