Wait Indicator
The Indicator class provides a simple way to add wait indicator animations to terminal output for long-running operations.
Introduced in FalconPy v1.5.1.
Indicator types
Section titled “Indicator types”| Style | Preview | Description |
|---|---|---|
moon | 🌕🌖🌗🌘🌑🌒🌓🌔 | Moon phase cycle (default) |
clock | 🕛🕐🕑🕒🕓🕔🕧🕖🕗🕘🕙🕚 | Rotating clock faces |
thinking | 🤔🤔🤔🤔🤔 | Thinking face with slow blink |
cylon | ooooooooOooooooooOooooooooOooooooooOooooooooOooooooooOooooooooOooooooooOoooooooo | Bright scan through dim field |
kitt | ········o·······Oo······oOo······oOo······oOo······oOo······oOo······oOo······oO·······o········ | Comet sweep with trail |
Properties
Section titled “Properties”| Property | Data Type | Mutable | Description |
|---|---|---|---|
indicator | List of strings | No | Current indicator frames. |
position | Integer | Yes | Current position within the indicator list. |
The default indicator is moon. Change it using the style keyword argument.
Moon (default)
Section titled “Moon (default)”from time import sleepfrom falconpy import Indicator
wait = Indicator()for x in range(0, 30): print(f" {wait}", end="\r") sleep(.25)from time import sleepfrom falconpy import Indicator
wait = Indicator(style="clock")for x in range(0, 30): print(f" {wait}", end="\r") sleep(.25)