views:

366

answers:

1

I have a simple pygtk app using urllib2, what changes should I make to add working twisted code?

The pbgtk2.py example it's confusing

+3  A: 

You switch from using the gtk mainloop to the right Twisted reactor. Or you decide to run Twisted in a separate thread using reactor.run(installSignalHandlers=0), and stay with the gtk mainloop.

You decide if you want to defer the urllib2 call to its own thread, or if you want to rewrite that code using Twisted's HTTP client libraries.

You go to the Twisted mailing list or IRC channel and ask for help.

Andrew Dalke