Hello World! I am Abhivishrut Bishnoi.
In this video, I will show you How you can build a music player GUI using python.
It is a small which covers in 27 lines of Python code.
It is a small which covers in 27 lines of Python code.
Source Code: Step 1:
pip install pygame
Step 2:
import pygame
from pygame import mixer
from tkinter import *
abhi=Tk()
abhi.title('Music Player By Codewati')
abhi.geometry("600x200")
mixer.init()
mixer.music.load("sharaabi.mp3")
def pause():
mixer.music.pause()
def play():
mixer.music.play()
def resume():
mixer.music.unpause()
Label(abhi,text="Sharaabi",font="lucidia 30 bold").pack()
Button(text="Play",command=play).place(x=200,y=100)
Button(text="Pause",command=pause).place(x=250,y=100)
Button(text="Resume",command=resume).place(x=310,y=100)
Button(text="Quit",command=quit).place(x=380,y=100)
abhi.mainloop()
Comments