Skip to content

Instantly share code, notes, and snippets.

@takenoko-str
Created November 30, 2016 16:17
Show Gist options
  • Save takenoko-str/32ccf98297129af6eb1f64efecb10882 to your computer and use it in GitHub Desktop.
Save takenoko-str/32ccf98297129af6eb1f64efecb10882 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import sys, time
def one_satisfied_bar(char='#',length=100):
for i in range(length):
sharp = -abs(i-length//2) + length//2
space = abs(i-length//2)
txt = '|' + char*sharp + '>' + ' '*space + '|' + '\r'
#sys.stdout.write(txt)
print txt,
sys.stdout.flush()
time.sleep(0.01)
for i in range(4):
one_satisfied_bar('=')
print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment