python怎么播放音乐文件
1个回答
2017-08-11 · 知道合伙人互联网行家
关注
展开全部
python播放音乐文件:
01 import mp3play
02
03 filename = r'C:\Documents and Settings\Michael\Desktop\music.mp3'
04 mp3 = mp3play.load(filename)
05
06 mp3.play()
07
08 # Let it play for up to 30 seconds, then stop it.
09 import time
10 time.sleep(min(30, mp3.seconds()))
11 mp3.stop()
01 import mp3play
02
03 filename = r'C:\Documents and Settings\Michael\Desktop\music.mp3'
04 mp3 = mp3play.load(filename)
05
06 mp3.play()
07
08 # Let it play for up to 30 seconds, then stop it.
09 import time
10 time.sleep(min(30, mp3.seconds()))
11 mp3.stop()
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询