Open amirotin opened 8 years ago
Hi, amirotin! Unfortunately, the current implementation only supports one progress bar/ progress percent tracker at a time. I think that having nested progress bars would be a super useful feature. However, I am currently not sure how to implement it (it would require that you could jump between multiple lines in the output stream. But I will leave this issue open, and I will brainstorm a bit.
Hi rasbt, could this potentially be implemented using the curses library? It allows you to manipulate the cursor position with greater control than how you're currently doing it. I believe this would also allow the users to print to stdout while looping without duplicating the progress indicator.
@BrandonHeinrich Sorry for getting back to you so late, I'd been on vacation in December, and somehow the note must still be buried in some email inbox
Anyway, I honestly haven't heard of the curses
library before; didn't know that such a neat package would be in the stdlib. I think it would be great to substitute the current way of printing the progress bar using curses
. This may then also make the "double progressbars" possible!
I am not sure when I'd be able to get to that, but if you (or someone else) wants to contribute, I'd be very happy about this addition! :)
This anwser maybe help,https://stackoverflow.com/questions/6840420/python-rewrite-multiple-lines-in-the-console
Thanks! I remember looking at the curses library some time ago. I think the reason why I ended up not using it for PyPrind was that it's OS specific. Personally, I am only using macOS and Linux, but I think a large portion of Python users in general are using Windows, which doesn't support curses afaik
Hi. Thx for this package. I've one question: How can i use 2 progressbars at same time? One for main loop, second for subloop? For example file copy utility (like in FAR): 1 progressbar shows how many files ramained 2 progressbar shows file copy progress
I've tryed to simply add second bar inside first bar loop
here is output
this is not what i exspected to see :)