发布网友 发布时间:2022-04-23 04:07
共1个回答
热心网友 时间:2022-04-27 08:23
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()