Skip to content

Instantly share code, notes, and snippets.

@parezcoydigo
Created June 15, 2013 05:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parezcoydigo/5787043 to your computer and use it in GitHub Desktop.
Save parezcoydigo/5787043 to your computer and use it in GitHub Desktop.
Simple python countdown clock using sys.stdout
import datetime, sys, time
while secs >= 0:
sys.stdout.write("\r%s" % str(datetime.timedelta(seconds=secs)))
sys.stdout.flush()
secs -= 1
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment