I'm something new in this programming, I've seen several codes, but I do not get the point I want to get, I want to put on my hobbies, a music player and a background photo. But this jumps me the error of the title.
class App:
def __init__(self, master):
frame = tk.Frame(master)
frame.pack()
self.button = tk.Button(frame, text='play', command=self.play_sound)
self.button.pack(side=tk.LEFT)
self.button2 = tk.Button(frame, text='stop', command=self.stop_sound)
self.button2.pack(side=tk.LEFT)
def ayuda(self):#funcion para que aparezca la ayuda
root=Toplevel(bg="BLUE")#crea una ventana con fondo celeste
root.minsize(300,0)# tamaño de ventana
root.resizable(width=NO,height=NO)# no se hace mas pequña
root.title("About")#titulo
instruccion=Message(root,text="Soy Róger ")
# lo anterior es el mensaje que se imprime
instruccion.place(x=0,y=0)#lugar del mensaje
def play_sound(self):
PlaySound('Sound.wav', SND_FILENAME|SND_LOOP|SND_ASYNC)
def stop_sound(self):
PlaySound(None, SND_FILENAME)
root = tk.Tk()
app = App(root)
root.mainloop()