Created
September 1, 2012 11:05
-
-
Save danielpclark/3569865 to your computer and use it in GitHub Desktop.
An old alarm clock script. Windows only.
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
"""Alarm Clock ver 0.1""" | |
#This does not get compiled into code but the triple quotes do. Windows Only. | |
""" | |
By Daniel P. Clark | |
11-14-2000 | |
""" | |
import time, winsound, sys, os, string | |
def waiter(): | |
print string.center('Welcome! To 6ft Dan(TM) Alarm Clock! Ver. 0.1', 79) | |
while 1: | |
mytime = time.ctime(time.time()) | |
print "\b" * len(mytime) + "\b" + mytime, | |
if mytime[int(11):int(13)] == "07": | |
if mytime[int(14):int(15)] == "0": | |
if mytime[int(17):int(19)] == "00": | |
winsound.PlaySound("Alarm.wav", winsound.SND_FILENAME) | |
else: | |
pass | |
time.sleep(1) | |
waiter() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment