Skip to content

Instantly share code, notes, and snippets.

@navinthenapster
Created May 8, 2019 11:52
Show Gist options
  • Save navinthenapster/41ec90a00c7159aa7bc6c2b6e4bd8217 to your computer and use it in GitHub Desktop.
Save navinthenapster/41ec90a00c7159aa7bc6c2b6e4bd8217 to your computer and use it in GitHub Desktop.
Loading script for printing the spinner in console
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