python-progressbar
python-progressbar copied to clipboard
Support 'with' statement.
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.
Also maybe it shouldn't call finish() if there was an exception? .finish() fills in the whole progress bar to the end?
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.