Hi,
I was reading through the conversation and while I am no expert what I
realized was that a lot of background networking tasks are executed in
separate threads when pyGTK is used. There is a standardized method that
needs to be followed when such network processing has to be combined with UI
up
John Finlay napsal(a):
The problem is that gtk and by extension pygtk has an event loop, and
the python speechd api has implemented its own event loop within a
thread. The speechd protocol is synchronous and sounds similar to
RPCs. This event loop conflict was in general a problem with RPC
pro
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Threading and pyGTK can be very complex - do your callbacks get called
right out of your main thread (where I assume pyGTK's loop is running?)
It might be worth you posting a bit to the list. There are lots of
programs that both do network process
James Simmons wrote:
Michael,
Thanks for the tip! It was a big help. I put gtk.gdk.threads_init()
in the __init__ method of my program and I did get callbacks. It
looks like I didn't get callbacks for every word, but Pygtk seems to
not be the problem anymore. Thanks again,
The problem is
Michael,
Thanks for the tip! It was a big help. I put gtk.gdk.threads_init()
in the __init__ method of my program and I did get callbacks. It looks
like I didn't get callbacks for every word, but Pygtk seems to not be
the problem anymore. Thanks again,
James Simmons
Michael Urman wrot
On Thu, Apr 24, 2008 at 1:16 PM, James Simmons
<[EMAIL PROTECTED]> wrote:
> The words are spoken correctly, but the callbacks that *should* be invoked
> after each word never happen.
I see no sign of a call to gtk.gdk.threads_init() or whatever the
current preferred alternative is. Without a call
Dave,
This is an abridged version of the code, concentrating on the important
parts. Basically the gtk.TextView contains one page of the Etext, and
the user presses the space key to start speech dispatcher going on the
text. The words are spoken correctly, but the callbacks that *should*
be
I have been working on a Pygtk pgrogram for the OLPC project which is a
reading program for Project Gutenberg Etexts. Several people on the
OLPC mailing list suggested enhancing it to work with speech-dispatcher
so that the program could read the texts aloud, at the same time
highlighting the