Created
May 8, 2019 11:52
-
-
Save navinthenapster/41ec90a00c7159aa7bc6c2b6e4bd8217 to your computer and use it in GitHub Desktop.
Loading script for printing the spinner in console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
def spinning_cursor(): | |
while True: | |
for cursor in '|/-\\': | |
yield cursor | |
spinner = spinning_cursor() | |
for _ in range(50): | |
sys.stdout.write(next(spinner) + " Analyzing .." ) | |
sys.stdout.flush() | |
time.sleep(0.1) | |
sys.stdout.write('\r') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment