Synchronizing a sound with a widget change

ast nomail at invalid.com
Thu Nov 13 11:56:43 CET 2014


"ast" <nomail at invalid.com> a écrit dans le message de news:54648d03$0$1981$426a74cc at news.free.fr...

>
> I have the idea to run an other thread to emit the sound, but I didn't try yet.
> Is it the solution ?
>

nope, still doesn't work !

-------------------------------------------
from tkinter import Tk, Frame
from winsound import Beep

def mybeep():
    Beep(2000, 1000)

root = Tk()

f = Frame(root, width=300, height=300)
f.pack()

f.config(bg='Yellow')
root.after(1, mybeep)
-------------------------------------------- 




More information about the Python-list mailing list