verigak / progress

Easy to use progress bars for Python
ISC License
1.41k stars 179 forks source link

finish a progress bar without printing a new line #5

Open skalkoto opened 11 years ago

skalkoto commented 11 years ago

Before the hide_cursor option was introduced, finish() just printed a new line and calling the method after the progress was completed was optional. If the user wanted to overwrite the progress bar line, he could just omit calling finish() and print something like this "\r\033[K" to the output.

Right now finish() does 2 jobs. It prints a new line and unhides the cursor if it was hidden. If the hide_cursor is enabled, not calling finish() is not an option anymore. It would be useful if the user could pass an optional argument to finish() to disable the "print new line" action.