-1
After I click the Button the window stops responding until the sound ends, and what I wanted it to continue to answer after clicking the button
import winsound
b=winsound.Beep
class janela:
def __init__(self, janela):
self.frame=Frame(janela)
self.frame.pack()
janela.resizable(width=True, height=True)
janela.config(bg='gray')
janela.title('PIIIIIII')
Canvas(janela, width=600, height=680, bg='BLACK').pack()
fonte=('Comic Sans MS','14','bold')
self.botao=Button(self.frame, text='Pi',
command=(self.tocar), font=fonte,
fg='red', bg='yellow')
self.botao.pack(side=LEFT)
self.botao1=Button(self.frame, text='Pi2',
command=(self.toca2), font=fonte,
fg='red', bg='grey')
self.botao1.pack(side=LEFT)
def tocar (self):
b(1000,1000)
def toca2 (self):
b(2000, 1000)
jan1=Tk()
janela(jan1)
jan1.mainloop()```
all right, thanks.
– ChickChuck2