Busy Indicator¶
New in version 1.0.0.
Module to make a blinking ASCII busy indicator.
-
class
lsl.common.busy.
BusyIndicator
(message='Busy', interval=0.5, dots=3, color=None)¶ Object to make a ASCII busy indicator for use with various long- run tasks that don’t have a way of calculating how long they will take.
- Example Usage:
>>> from busy import BusyIndicator >>> bi = BusyIndicator() >>> bi.start() >>> longRunningTask() >>> bi.stop()
-
start
()¶ Start the indicator running.
-
stop
(success=True)¶ Stop the indicator and display a ‘Done’ or ‘Failed’ message depending on whether or not the ‘success’ keyword is True.
Note
This can take up to one BusyIndicator.interval to complete.
-
class
lsl.common.busy.
BusyIndicatorPlus
(message='Busy', interval=0.1, width=10, style='flow', color=None)¶ -
stop
(success=True)¶ Stop the indicator and display a ‘Done’ or ‘Failed’ message depending on whether or not the ‘success’ keyword is True.
Note
This can take up to one BusyIndicator.interval to complete.
-