Skip to content

tqdm_auto to auto detect submodule to use depending on frontend #234

@lrq3000

Description

@lrq3000

Maybe we can make a tqdm_auto submodule which would try to autodetect the frontend env and provide the most appropriate module, eg:

  • tqdm_notebook for IPython notebook.
  • tqdm_gui for IDEs not supporting \r control character such as IDLE and PyCharm.
  • core tqdm for the rest.

The proposition is interesting because it would fix three issues:

  • Some users are targetting multiple envs, currently they have to fix this by themselves.
  • Some IDEs do not support the required control characters, so there's no way to fix core tqdm display issues. But by providing a tqdm_auto wrapper, users could just use that in most instances and get a correctly displayed progress bar.
  • With tqdm being more and more included in various libraries, the risk that these libraries get used in various development environment increases and thus the usage of tqdm. In these instances, tqdm should be resilient enough to ensure that it's not the breaking point for a library (it must not prevent the usage of a library in any env).

What do you think about it guys?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions