Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def unpacker():
sp = yaspin(Spinners.simpleDotsScrolling, side="right")
try:
sp.start()
for p in range(0, 101, 5):
sp.text = "{0}% Unpacking".format(p)
time.sleep(random.random())
sp.green.ok("✔")
except KeyboardInterrupt:
sp.red.fail("✘")
sp.stop()
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 unpacker():
swirl = yaspin(
spinner=Spinners.simpleDotsScrolling,
sigmap={signal.SIGINT: fancy_handler},
side="right",
)
with swirl as sp:
for p in range(0, 101, 5):
sp.text = "{0}% Unpacking".format(p)
time.sleep(random.random())
sp.green.ok("✔")
def context_mngr_setup():
with yaspin(Spinners.noise, text="Noise spinner") as swirl:
time.sleep(2)
swirl.spinner = Spinners.simpleDotsScrolling
swirl.text = "Scrolling Dots spinner"
swirl.color = "magenta"
time.sleep(2)