verigak / progress

Easy to use progress bars for Python
ISC License
1.41k stars 179 forks source link

New progress bar for unknown amount of iterations in advance #26

Open farchy opened 8 years ago

farchy commented 8 years ago

Added a new progress bar for infinite (unknown max) iterations. Added a test for it in test_progress.py

verigak commented 8 years ago

Hi, this is very interesting, but the implementation can be simplified a lot. You can implement an AdaptiveMixin that overrides percent and progress. Then AdaptiveBar can become a one liner:

class AdaptiveBar(AdaptiveMixin, IncrementalBar): pass

That way you can make any of the existing bars become adaptive.

farchy commented 8 years ago

ACK, will change the implementation... Would you prefer that as a new PR or keep working on this?

verigak commented 8 years ago

Let's keep working on this one for now and see if we can squash the commits in the end.