Created
June 15, 2013 05:33
-
-
Save parezcoydigo/5787043 to your computer and use it in GitHub Desktop.
Simple python countdown clock using sys.stdout
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 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