How to change tqdm.notebook progress bar style?

15 Views Asked by At

I am using tqdm in a notebook (run within VS Code).
I am importing tqdm with

from tqdm.notebook import tqdm

The bar Looks like this enter image description here

But I'd like to have a normal progress bar made with ASCII characters like this
enter image description here

Do you know if it is possible to change the bar style?

Edit

I know there is bar_format parameter in tqdm() but I don't know how to change it to make my bar being printed with ASCII characters

1

There are 1 best solutions below

0
mudskipper On

If your question is "How can I switch automatically between terminal and notebook style", the answer is: Use this

from tqdm.autonotebook import tqdm

If your question is "Can I customize the tqdm bar style", the answer is: Yes, you can take complete control over the style, see help(tqdm.tqdm) for all the defaults that can be reset.