程序很簡單,主要是 mp3play 模塊的應用
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分鐘)
演示圖:
以上所述就是本文的全部內容了,希望大家能夠喜歡。
新聞熱點
疑難解答