Skip to content

Instantly share code, notes, and snippets.

@danielpclark
Created September 1, 2012 11:05
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 danielpclark/3569865 to your computer and use it in GitHub Desktop.
Save danielpclark/3569865 to your computer and use it in GitHub Desktop.
An old alarm clock script. Windows only.
"""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