📜  在 tkinter 中按下按钮后如何播放声音 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:15.450000             🧑  作者: Mango

代码示例1
from Tkinter import *
import mp3play

root = Tk() # create tkinter window

f = mp3play.load('Sound.mp3'); play = lambda: f.play()
button = Button(root, text = 'Play', command = play)

button.pack()
root.mainloop()