verigak / progress

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

No Random progress bar #25

Closed farchy closed 8 years ago

farchy commented 8 years ago

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)?

verigak commented 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?

farchy commented 8 years ago

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.

verigak commented 8 years ago

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()