API¶
-
animation.
simple_wait
(func)¶ Decorator for adding simple text wait animation to long running functions.
Examples
>>> @animation.simple_wait >>> def long_running_function(): >>> ... 5 seconds later ... >>> return
-
animation.
wait
(animation='elipses', text='', speed=0.2)¶ Decorator for adding wait animation to long running functions.
Parameters: - animation (str, tuple) – String reference to animation or tuple with custom animation.
- speed (float) – Number of seconds each cycle of animation.
Examples
>>> @animation.wait('bar') >>> def long_running_function(): >>> ... 5 seconds later ... >>> return
-
class
animation.
Wait
(animation='elipses', text='waiting', speed=0.2)¶ Class for managing wait animations.
Parameters: - animation (str, tuple) – String reference to animation or tuple with custom animation.
- text (str) – Optional text to print before animation.
- speed (float) – Number of seconds each cycle of animation.
Examples
>>> animation = Wait() >>> animation.start() >>> long_running_function() >>> animation.stop()
-
start
()¶ Start animation thread.
-
stop
()¶ Stop animation thread.