1from tkinter import*
2import pyglet
3
4root = Tk()
5
6player = pyglet.media.Player()
7song = "er.mp3"
8src = pyglet.media.load(song)
9player.queue(src)
10
11def play():
12 player.play()
13
14def pause():
15 player.pause()
16
17button_1 = Button(root,text = "Play", command = play)
18button_1.pack()
19button_2 = Button(root,text = "Pause", command = pause)
20button_2.pack()
21
22root.mainloop()
23