How to print rotating ◓->tick as progress bar in terminal?

Hi all

I’m looking into progress bar options for Julia. Many packages, during installation, show a rotating ◓ becoming a tick when finished. Anyone can help how to print out this dynamic symbol?

Thanks a lot!

Not the rotating symbol but GitHub - timholy/ProgressMeter.jl: Progress meter for long-running computations offers a progress bar.

3 Likes

Looks like it is mixed in with the precompile monitoring logic, but the list of characters is easy to grab:

1 Like

See also this issue to add spinner animations to ProgressMeter.jl, which links to some sample code: Different ProgressBar styles? · Issue #92 · timholy/ProgressMeter.jl · GitHub

4 Likes

Thank you, it is very helpful.

A PR to support rotating “spinners” in ProgressMeter.jl is here: add spinner option to ProgressUnknown by stevengj · Pull Request #206 · timholy/ProgressMeter.jl · GitHub

3 Likes

With the latest version of ProgressMeter (1.7.1), you can now just pass spinner=true when creating a ProgressUnknown meter. For example:

prog = ProgressUnknown("Working hard:", spinner=true)
while true
    ProgressMeter.next!(prog)
    rand(1:2*10^8) == 1 && break
end
ProgressMeter.finish!(prog)
11 Likes