Closed farchy closed 8 years ago
I'm not sure what the utility of this would be, other than demo. Do you have any use case in mind?
I implemented an adaptive progress bar (i.e. no known max value, and percentage progresses slower on every update), Thought a random one will also serve the purpose of showing something being done with no apparent max value.
I saw your implementation and it is fine, but I think it is too niche to add it. I'd like to have more general purpose bars and then allow people to build their own specific cases on top.
BTW, if you use some of the internals you could also implement it with something shorter like:
class Random(IncrementalBar):
def next(self, n=1):
self.index = random.randint(0, 100)
self.update()
In the image on
README.md
you show a Random progress bar.Are you open for PRs on this (i.e. a class for Random bar instead of users working around
IncrementalBar
)?