6 ms·
I tend to side with your opinion (obviously, based on the above code), but detaro does have a point, which is that the progress message will "overflow" onto a n
by user2426679 8y ago
I tend to side with your opinion (obviously, based on the above code), but detaro does have a point, which is that the progress message will "overflow" onto a new/next line in the console if the message has more characters than will fit on a single of the terminal.
fwiw, line_len=79 is the default on both windows and linux ime. You would only encounter overflow if you (1) shrunk the terminal from its default width and (2) printed a message that was longer than that shrunken width.
If you really needed to have a progress bar that accounted for a shrunken display, it could be accomplished trivially with Python 3.? and less-trivially with Py2.
I could see depending on this library if the application was client facing and needed to be automagically pretty.
Also, one thing to note is that tqdm only fetches the console width when init'ing a progress bar... if you shrink the terminal while a progress bar is still "in progress," you will encounter the same overflow issue.