Event-Driven Woes: making wxPython and Twisted work together

matiu matthew.s at orcon.net.nz
Thu Dec 30 21:05:10 CET 2004

Hi Daniel,

I went down that road for a long time. I made a recipe to help people


Don't be intimidated by the size, that's a whole demo app complete with
gui. It works quite well. It uses two threads, wx runs in the main
thread and twisted runs in the second thread.

You'll probably just want to glean solutions from it and write your own
framework. It does still have some hicups!

I gave up trying to perfectionalise it and switched to pygtk, glade and

pygtk runs fine on both linux and windows, and you get a gui designer.
The only downside is that it has less widgets. It has the advantage of
themes though, this means on windows you can make it look like windows,
linux, mac or whatever. Also your app will load faster than a wx app.
Unfortunately it does take up more disk space though.

Anyway to make wx and twisted work together, put twisted in a secondary
thread. I tried making them co-exist in a single thread as some other
recipes suggest, but basically modal dialogs don't seem to work

This recipe might be an easier solution for you. Haven't tried it

God Bless

More information about the Python-list mailing list