Hi,
I am writing a software and I would like to multithread it.
I've put the whole GUI into a class which inherits from
threading.Thread. This is the code:
class gui(threading.Thread):
def run(self):
self.gui = libglade.XML("gui.glade")
self.nameFuncMap = {}
for key in dir(self.__class__):
self.nameFuncMap[key] = getattr(self, key)
self.gui.signal_autoconnect(self.nameFuncMap)
gtk.threads_init()
gtk.main()
The problem is that I want to receive also events from the core part of
the program.
I know I can define a self._signal = threading.Event() into the
constructor or the run() method, but I don't know where to put the
self._signal.wait(), because gtk.main() "monopolizes" the thread.
Any idea?
Must I subdivide the GUI thread into 2 separate threads? And if so...
how? :)
Thanks! Bye.
--
Alessandro Pellizzari
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/