I struggled with getting some asynchronous activity to work in PyGTK when someone suggested I look at using Twisted.
I know that Twisted started as a network environment, but it can be used for other things. However, every single example I have ever seen includes many network codes. I would like to see an example of using Twisted for a simple PyGTK desktop application, without requiring too much mental effort to understand the network aspect of things.
So: Is there a simple, simple tutorial or example of using Twisted to create a GTK application (PyGTK) and perform asynchronous tasks?
(Yes, I saw pbgtk2.py . It is uncommented, network oriented and completely puzzled by the newbie.)
Updated: I listed various problems with glib.idle_add / gtk.gdk.lock , and friends did not work fine under Windows. This was all justified on the pygtk list - there is some kind of trickery that is needed with PyGTK to get asynchronous behavior running on Windows.
However, my point of view is still that at any time when I mention asynchronous activity in PyGTK, someone says: "Do not use threads, use Twisted!" I want to know why and how.
source share