Closed JaskaranSM closed 2 years ago
It's known limitation. PB is written to stdout by default. Its output may be corrupted if another party writes to stdout while PB is rendering. There is some api which allows to circumvent this at some extent: BarExtender BarFillerMiddleware
请问这个问题是如何解决的? Same problem, how to resolve it?
similar problem, and i think BarExtender
and BarFillerMiddleware
solution is too complicated. sometimes i just want to print some warnings or logs that don't need to be refreshed anymore, and then mpb can move down.
now we have
Task: 6769 / 7200 [======================================================================================================================================================>----------] 94 % 717.3 it/s 0s 10s
[WARN] xxxxxxx
Task: 7200 / 7200 100 % 655.3 it/s done in 10s
but i expect
[WARN] xxxxxxx
Task: 6769 / 7200 [======================================================================================================================================================>----------] 94 % 717.3 it/s 0s 10s
and then
[WARN] xxxxxxx
Task: 7200 / 7200 100 % 655.3 it/s done in 10s
maybe it's better to provide an io pipe for developers, then mpb will dump the pipe into stdout before bar rendering in each refresh cycles.
Hi, The Library works really nice. but there is just one problem i m having, i m using the library for concurrent progress bars with dynamic addition of bars in Progress pool, if some function call writes to stdout, then the bar that pool was showing gets stuck. however the pool does preserve the bar at the last line of stdout. its just, it is expected to remove that old stuck bar from stdout also. when it moves to the last line. i can share the code if you need for debugging. thanks.