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
--
http://mail.python.org/mailman/listinfo/python-list