Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80687
| Date | 2014-11-13 22:34 +0800 |
|---|---|
| From | "Yimr Zero" <yimr00@gmail.com> |
| Subject | Re: Synchronizing a sound with a widget change |
| References | <54648d03$0$1981$426a74cc@news.free.fr> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15777.1415889291.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
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 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')) and at the same time to emit a sound (Beep(2000, 1000)) But I first have the sound and when the sound is over the window appears. Is there a way to fix that ? I have the idea to run an other thread to emit the sound, but I didn't try yet. Is it the solution ? Thanks
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Synchronizing a sound with a widget change "ast" <nomail@invalid.com> - 2014-11-13 11:50 +0100
Re: Synchronizing a sound with a widget change "ast" <nomail@invalid.com> - 2014-11-13 11:56 +0100
Re: Synchronizing a sound with a widget change "ast" <nomail@invalid.com> - 2014-11-13 12:06 +0100
Re: Synchronizing a sound with a widget change Dave Angel <davea@davea.name> - 2014-11-13 06:42 -0500
Re: Synchronizing a sound with a widget change "ast" <nomail@invalid.com> - 2014-11-13 14:25 +0100
Re: Synchronizing a sound with a widget change "Yimr Zero" <yimr00@gmail.com> - 2014-11-13 22:34 +0800
Re: Synchronizing a sound with a widget change Dave Angel <davea@davea.name> - 2014-11-13 11:15 -0500
csiph-web