Re: Synchronizing a sound with a widget change

2014-11-13 Thread Dave Angel
"Yimr Zero" Wrote in message: > body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; > margin-left: 0.5em; }body { font-size: 10.5pt; font-family: 'Segoe UI'; > color: rgb(0, 0, 0); line-height: 1.5; } > Hi, > You may try to add the sleep(5) after the color change statemen

Re: Synchronizing a sound with a widget change

2014-11-13 Thread Yimr Zero
Hi, You may try to add the sleep(5) after the color change statement. You could adjust the sleep time to let the color change and beep synchroize. Thanks. Yimr Zero From: ast Date: 2014-11-13 18:50 To: python-list Subject: Synchronizing a sound with a widget change Hello, here is a small

Re: Synchronizing a sound with a widget change

2014-11-13 Thread ast
"Dave Angel" a écrit dans le message de news:mailman.15773.1415878987.18130.python-l...@python.org... I don't use Windows, but from what I read, winsound.Beep is a blocking call, and therefore must not be used in the main thread of a gui environment. Once the function is called, no events

Re: Synchronizing a sound with a widget change

2014-11-13 Thread Dave Angel
"ast" Wrote in message: > > "ast" a écrit dans le message de > news:54648e75$0$12771$426a7...@news.free.fr... >> >> "ast" a écrit dans le message de >> news:54648d03$0$1981$426a7...@news.free.fr... >> >>> >>> I have the idea to run an other thread to emit the sound, but I didn't try >>> yet.

Re: Synchronizing a sound with a widget change

2014-11-13 Thread ast
"ast" a écrit dans le message de news:54648e75$0$12771$426a7...@news.free.fr... "ast" a écrit dans le message de news:54648d03$0$1981$426a7...@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

Re: Synchronizing a sound with a widget change

2014-11-13 Thread ast
"ast" a écrit dans le message de news:54648d03$0$1981$426a7...@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 wi

Synchronizing a sound with a widget change

2014-11-13 Thread ast
Hello, here is a small test code: from tkinter import Tk, Frame from winsound import Beep root = Tk() f = Frame(root, width=300, height=300) f.pack() f.config(bg='Yellow') Beep(2000, 1000) -- I intended to change the frame color to yellow (f.config(bg='Yellow')) a