Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5380 > unrolled thread
| Started by | andy baxter <andy@earthsong.free-online.co.uk> |
|---|---|
| First post | 2011-05-14 19:51 +0100 |
| Last post | 2011-05-14 19:51 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: threads with gtk gui problem andy baxter <andy@earthsong.free-online.co.uk> - 2011-05-14 19:51 +0100
| From | andy baxter <andy@earthsong.free-online.co.uk> |
|---|---|
| Date | 2011-05-14 19:51 +0100 |
| Subject | Re: threads with gtk gui problem |
| Message-ID | <mailman.1557.1305399104.9059.python-list@python.org> |
On 14/05/11 14:12, Andy Baxter wrote: > Hi, > > I'm working on adding a Gtk GUI to a python program. Its main function > is to read raw data from an arduino board over USB, and convert it to > MIDI note/controller events to be sent to another program. I've had it > working fine with just a command line interface, but when I replaced > the command line with a Gtk interface, I started having problems > getting the thread that reads the USB port to run. I've solved this by adding 'import gobject' and 'gobject.threads_init()' to the start of the program. Looks like if you don't do this then the gtk main loop never releases the python threading lock to other threads. andy
Back to top | Article view | comp.lang.python
csiph-web