Open imathews opened 3 months ago
Sounds like Jupyter Notebook handles output differently. I don't use it, so I haven't tested it there.
What happens if you use:
handlers(handler_txtprogressbar(file=stdout()))
?
Unfortunately that doesn't seem to work either. I've put together a sample colab notebook to reproduce this easily (I'm fairly certain colab is using the same IRKernel as Jupyter under the hood to communicate with R, at the least we see the same behavior).
One other piece of information is that calling a simple cat("\r", val)
within the for loop doesn't yield any output until the end, though if we add a flush.console()
after cat()
, we can see the output updated live.
I tried writing my own custom handler to leverage this behavior, though was unsuccessful - likely due to my limited knowledge here.
Adding my vote here. I'd really like this to work properly.
I've been unable to get text progress bars (or really any progressr handler) to display within a Jupyter notebook. Given the following test case in a Jupyter environment, nothing displays when using progressr, though displays as expected if using
utils::txtProgressBar
. Both scenarios work just fine in RStudio.https://github.com/HenrikBengtsson/progressr/assets/5659375/ec29b8ec-6020-4e5e-a281-dd41df6a5a23