find_work.core.cli.widgets#
Components for displaying imformation to the console.
- class find_work.core.cli.widgets.ProgressDots(enabled: bool)#
Bases:
object
Print a status indicator to the terminal at equal intervals of time:
import sys import time dots = ProgressDots(sys.stderr.isatty()) with dots("Doing stuff"): time.sleep(5.5)
The example above would print:
Doing stuff . . . . .
Implementation notes:
First indication is delayed by the interval length.
When the indication stops, a newline is printed.
- interval: float = 2.0#
- indicator: str = ' .'#