ahhh thanks. James's post on the FAQ about generators was very promising. I started out to code threading but when I finished and ran it - I realized that redhat had compiled pygtk without threading support (another one of their "atrocities"). I opted for laziness and explored generators but I realized I had already coded the algorithm to call many functions and generators didn't make any sense in this case.
Take the example: I have to call a function to display newsfeed every hour - so I add a timer event. Now that newsfeed function instantiates another class and calls its function to fetch and display data in a textview. Now to call that function in a timeout_add again and adding generator support didn't appeal to me at all. So I'm adding gtk.main_iteration() and hoping it would work smoothly. Ta Prash On Mon, 2004-06-21 at 09:07, Toon Verstraelen wrote: > Prash wrote: > > Can anyone give me an example of threading or point me to a resource > > please? Basically I have a textview where I display live newsfeed at > > regular intervals. The main thread hangs whilst it's doing the fetching > > and displaying work. So I want a separate thread that will do the job > > without affecting the main one. > > _______________________________________________ > > pygtk mailing list [EMAIL PROTECTED] > > http://www.daa.com.au/mailman/listinfo/pygtk > > > > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ > section 20 of the FAQ is a good starting point > _______________________________________________ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
