python-progressbar icon indicating copy to clipboard operation
python-progressbar copied to clipboard

Support 'with' statement.

Open kousu opened this issue 5 years ago • 2 comments

This probably still needs some doc changes before it's worth taking, but I thought I'd throw it out there for you.

Fixes #70.

kousu avatar Jun 29 '20 07:06 kousu

Also maybe it shouldn't call finish() if there was an exception? .finish() fills in the whole progress bar to the end?

kousu avatar Jun 29 '20 07:06 kousu

Also maybe it shouldn't call finish() if there was an exception? .finish() fills in the whole progress bar to the end?

Yeah, finish ensures that the progress bar reaches 100% and prints a newline. If there's an exception you could just print a newline, so the progress bar would be stuck at whatever percentage the exception happened.

NiltonVolpato avatar Jul 15 '20 09:07 NiltonVolpato