一首mp3歌每半小时播放一次

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

import mp3play, time

filename = "Should It Matter.mp3"
clip = mp3play.load(filename)
while 1:
    if time.localtime().tm_min % 30 == 0:
        clip.play()
        print "\nStart to play"
        time.sleep(clip.seconds())
        clip.stop()
        print "Stop"
    print '>',
    time.sleep(30)  #暂停30秒(不是30分钟)