Skip to content

support bar_format when there is no total #343

@BoPeng

Description

@BoPeng

I would like to use tqdm to generate a simple status updating line, basically creating a progress bar with only {desc} at line 0,

prog = tqdm(desc=msg, position=0, bar_format='{desc}')

and update it from time to time with

prog.set_description(updated_desc)
prog.update(1)

However prog would print out time etc, despite of the parameter bar_format='{desc}'. Digging through the code I found that parameter bar_format is not used when there is no total so I cannot control the output in this case.

I can get around of this problem by setting a fake total, e.g.,

prog = tqdm(desc=msg, position=0, total=10000, bar_format='{desc}')

but this might be something you would like to fix.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions