Closed bobokun closed 2 years ago
I tried to set the config but it doesn't solve the problem.
config_handler.set_global(bar=None, receipt_text=False)
After completion it still shows the final output printed out
I'm using the alive_it
function
What's your code?
Here's an example code
from alive_progress import alive_it, config_handler
import time
config_handler.set_global(bar=None, receipt_text=False)
test = (range(100))
test2 = (range(50))
for x in alive_it(test):
time.sleep(0.1)
for x in alive_it(test2):
time.sleep(0.1)
Output:
100/100 [100%] in 10.0s (9.96/s)
50/50 [100%] in 5.0s (9.95/s)
I would like no output to be shown once it reaches 100%
Hello @bobokun,
No, there isn't an option to completely ignore the final receipt.
As you have seen, the option you've tried is called receipt_text
, i.e. it removes or shows the last situational text you may have set while the bar was running.
No one has ever asked this, but it should be easy enough to support. Just the new config parameter for this could maybe give some trouble, but I can do it eventually. At the moment I'm very involved with Rust and a new job I've recently started.
Great thank you!
Hello @bobokun, I'm glad to inform you this is ready! I should be releasing it today, if everything goes OK.
Is this available for me to test in a branch or is the release coming soon?
Not yet, but the release is very soon! I ended up implementing a bunch of other stuff together with this, so I'm polishing them up and then write the readme and changelog. I'll probably release it tomorrow.
Hey, it is released! #131 Take a look at the new readme for details! 🎉
Thanks! It's working perfectly :)
That's great to hear!! 😃 You're welcome!
For anyone in the future who comes here trying to figure out how to not show the final bar when the progress completes, just add receipt=False
to the keyword arguments in the alive_bar
method.
ie: with alive_bar(receipt=False):
(Also I just discovered this library today and it's one of the most legit things I've ever seen in Python!)
Thanks, man 👍
Sorry if I missed this option, but I wasn't clear if it is currently possible to choose not to print out the final bar once it reaches 100%. I would like to able to see the progress bar but once it's complete it does not stay in the terminal and the bar disappears completely