Created
March 3, 2016 14:09
-
-
Save danielskowronski/ff476992453d071a399a to your computer and use it in GitHub Desktop.
timer.sh na SFI
This file contains hidden or 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
# CZASOMIERZ | |
import time | |
import sys | |
t = int(sys.argv[1]) | |
from subprocess import call | |
call(["clear", ""]) | |
while t: | |
mins, secs = divmod(t, 60) | |
timeformat = '{:02d}:{:02d}'.format(mins, secs) | |
print(" "+timeformat, end="\r") | |
time.sleep(1) | |
t -= 1 | |
while True: | |
mins, secs = divmod(t, 60) | |
timeformat = '{:02d}:{:02d}'.format(mins, secs) | |
print(" \033[41m-"+timeformat, end="\033[49m !\r") | |
time.sleep(1) | |
t += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment