from tkinter import *
from playsound import playsound
from PIL import Image,ImageTk
def hello():
print("hello")
playsound('C:\\Users\\Rajib Kr paul\\OneDrive\\Documents\\visiual stdio code\\python practice\\M\\music.mp3')
def hi():
playsound('C:\\Users\\Rajib Kr paul\\OneDrive\Documents\\visiual stdio code\\python practice\\M\\music2.mp3')
def lol():
root.destroy()
#def bol():
#playsound('C:\\Users\Rajib Kr paul\\OneDrive\Documents\\visiual stdio code\\python practice\\M\\music3.mp3')
root = Tk()
root.geometry("666x444")
root.minsize(200,100)
root.maxsize(666,444)
root.title("Rajib paul")
bg=ImageTk.PhotoImage(file="C:\\Users\Rajib Kr paul\\OneDrive\Documents\\visiual stdio code\\python practice\\b2.jpg")
bglb=Label(root,image=bg)
bglb.place(x=0,y=-1000,height=1600,width=900)
x = Label(root,text=" WELCOME TO THIS MP3 PLAYER",bg="green",padx="30",pady="20",font="bold")
f1=Frame(root,bg="blue",borderwidth=6)
f1.place(x=20,y=70)
l=Label(f1,text="1.",fg="darkorange",font=('bold',15))
l.place(x=20,y=80)
l.pack()
f2=Frame(root,bg="blue",borderwidth=6)
f2.place(x=20,y=130)
m=Label(f2,text="2.",fg="darkorange",font=('bold',15))
m.place(x=20,y=120)
m.pack()
b1=Button(root,bg="green",text="start",command=hello)
b1.place(x=80,y=80)
b2=Button(root,bg="green",text="start",command=hi)
b2.place(x=80,y=140)
b3=Button(root,bg="red",text="stop",command=lol)
b3.place(x=40,y=180)
#b4=Button(root,bg="red",text="stop",command=bol)
#b4.place(x=120,y=140)
n=Label(root,text="You can play and exit\n after end of one song",font="italic",bg="grey")
n.place(x=40,y=240)
x.pack()
root.mainloop()
On this page of the site you can watch the video online Simple mp3 player using tkinter python with a duration of hours minute second in good quality, which was uploaded by the user science and technology 15 May 2021, share the link with friends and acquaintances, this video has already been watched 106 times on youtube and it was liked by 4 viewers. Enjoy your viewing!