import time,winsound
sfile=‘tada.wav‘
while 1:
count=0
a=int(input(‘time by Min:‘))
b=a*60
while (count<b):
ncount=b-count
print (ncount)
time.sleep(5)
count+=5
print (‘done‘)
for i in range(3):
winsound.PlaySound(‘C:\Windows\Media\\{}‘.format(sfile), winsound.SND_FILENAME)
原文:http://www.cnblogs.com/e35t/p/7111307.html