manrajgrover/halo

Synchronous spinner

Open

#47 opened on Feb 16, 2018

View on GitHub
 (7 comments) (0 reactions) (0 assignees)Python (149 forks)github user discovery
hacktoberfestup-for-grabs

Repository metrics

Stars
 (3,022 stars)
PR merge metrics
 (PR metrics pending)

Description

Support synchronous spinners which switch frames upon explicit request from a working thread like.

with Halo(spinner='dots') as spinner:
  for f in files_to_load():
    spinner.next(text="Loading %s" %f) # or .step(), or .tick(), or…
    do_load_file(f)

This can (as far as I understand) be achieved with .frame() but isn't as concise as the above. Possibly don't render new frame more often than interval.

Contributor guide