Skip to content

Instantly share code, notes, and snippets.

@cbrunnkvist
Created September 21, 2011 09:09
Show Gist options
  • Save cbrunnkvist/1231634 to your computer and use it in GitHub Desktop.
Save cbrunnkvist/1231634 to your computer and use it in GitHub Desktop.
Simplest fake progress indicator
#!/usr/bin/env python
# Update some incrementing counter to give feedback about progress
import time
import sys
try:
for i in range(101):
print i,
sys.stdout.flush()
time.sleep(0.01)
print "\r",
except:
pass
finally:
print ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment