You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to ask if there is a way to ensure that the progress bar would be located always at the end of the text, even if some output is being printed to the terminal.
To provide a visual example, I wanted my progress bar to look something like this
Where you can see the progress at the bottom of the terminal (or at the end of the text, would work either way) and if anything is printed to STDOUT/STDERR, it would not be cluttered by outdated versions of the progress bar, i.e.
I would also to state that, once I add the showvalues optional argument in next!, all of my printing is gone as the output is cleared to ensure that the progress bar remains in-place.
The text was updated successfully, but these errors were encountered:
jpmvferreira
changed the title
Place progress bar always at the bottom
Is there a way to place progress bar always at the bottom?
Oct 4, 2023
Using offset=1 and clearing manually lines with "\u1b[K":
using ProgressMeter
p =Progress(50; offset=1)
for i in1:50for _ in1:rand(0:2)
println(i, "\u1b[K")
endprint("\u1b[K")
next!(p; showvalues=("i"=>i,))
sleep(0.11)
end
It doesn't work in a notebook though, since offsets are broken with IJulia (#238)
I would like to ask if there is a way to ensure that the progress bar would be located always at the end of the text, even if some output is being printed to the terminal.
To provide a visual example, I wanted my progress bar to look something like this
Where you can see the progress at the bottom of the terminal (or at the end of the text, would work either way) and if anything is printed to STDOUT/STDERR, it would not be cluttered by outdated versions of the progress bar, i.e.
I would also to state that, once I add the
showvalues
optional argument innext!
, all of my printing is gone as the output is cleared to ensure that the progress bar remains in-place.The text was updated successfully, but these errors were encountered: