Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Add an option to disable progress bar #19

Open
hadim opened this issue May 28, 2015 · 5 comments
Open

Add an option to disable progress bar #19

hadim opened this issue May 28, 2015 · 5 comments

Comments

@hadim
Copy link

hadim commented May 28, 2015

Sometime it's convenient to not have progress bar. So it would be really nice to add an option to disable tqdm so the code does not need to be modified, only an option to turn off.

for i in tqdm.tqdm(range(10), total=10, disable=True):
    print(i)

Whith disable being False by default of course.

I can make a PR but I don't want to bother if the project is not maintained anymore... (see #18)

@kmike
Copy link

kmike commented May 29, 2015

+1 to this feature, I've created small tqdm wrappers which do just that more than once.

@minhoryang
Copy link

+1

FYI, this is what I did when I needed to disable it:

tqdm = lambda *i, **kwargs: i[0]

and It also used like this (whether tqdm existed or not, overall codes will run smoothly.):

try:
    from tqdm import tqdm
except ImportError:
    tqdm = lambda *i, **kwargs: i[0]  # pylint:disable=invalid-name

@hadim
Copy link
Author

hadim commented Jun 3, 2015

That would be nice to see that kind of feature integrated to tqdm indeed.

@jimanvlad
Copy link

Any news on whether this will be implemented?

@dubek
Copy link

dubek commented Dec 28, 2016

@jimanvlad This already exists in latest tqdm. Note that per #24 this repo is out-of-sync, the real repo is https://github.com/tqdm/tqdm .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants