Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def pre_setup_example():
swirl = yaspin(
spinner=Spinners.simpleDotsScrolling,
text="swirl",
color="red",
side="right",
sigmap={signal.SIGINT: fancy_handler},
)
with swirl as sp:
time.sleep(2)
with swirl as sp:
sp.text = "new swirl"
sp.reversal = True
time.sleep(2)
def fancy_keyboard_interrupt_handler():
with yaspin(sigmap={signal.SIGINT: fancy_handler}, text=DEFAULT_TEXT):
time.sleep(5)