Currently, I have a trick to handle input of unknown size: I set the .total to the next power of 2 above the soon-to-be-current value just before calling .update.
This guarantees that the fraction will repeatedly go from 50% up to 99%, which is actually a pretty decent UX. However, the tqdm-printed metadata includes my "total" as if it's fact, not merely a guess.
A better example is shown in visionmedia/node-progress#121 - though perhaps we should increase the size of the chunk logarithmically between some bounds (possibly altered by __length_hint__)?
Currently, I have a trick to handle input of unknown size: I set the
.totalto the next power of 2 above the soon-to-be-current value just before calling.update.This guarantees that the fraction will repeatedly go from 50% up to 99%, which is actually a pretty decent UX. However, the tqdm-printed metadata includes my "total" as if it's fact, not merely a guess.
A better example is shown in visionmedia/node-progress#121 - though perhaps we should increase the size of the chunk logarithmically between some bounds (possibly altered by
__length_hint__)?