Hide
Meet people who work on similar things as you – get help if you need it Join Siafoo Now or Learn More

Goodbye wxPython (?)

over 5 years ago

The project I have been working on for the past week or so is based on wxPython (+AUI) and VTK. Unfortunately the documentation for wxPython, when it comes to all but the most basic things, is minimal... at best... and the bugs seem plentiful (in wxAUI at least).

This has led me to waste several hours on annoying things like sizers not growing when they should and random crashes because I have composting on (wtf right?)... which has made me loose trust in wxPython as a toolkit and I really want... no I need this program to be rock solid. Also reading the saya blog made me realize I am not the only one having problems with wxAUI.

I don't want to imply that wxPython is garbage or anything... it's nice for creating quick and simple GUIs but the severe lack of actual documentation (especially at the fringes) has forced me to evaluate Qt as a possible replacement.

In the principle of measure twice, cut once before jumping into porting code I need to evaluate:

  1. Event Model
  2. Common dialogs (e.g. Color Selection, File Open/Save)
  3. Existence of advanced 3rd party widgets (e.g. Scintilla)
  4. Ease of writing custom widgets (like: wxPython Transfer Function Widget)
  5. Existence of Qt ports of example code the app uses (like Python console)
  6. Ease of integration with 3rd party toolkits (e.g. VTK)
  7. Documentation

I should also start porting from the bigger pieces (VTK integration) to see if Qt is just as slow as wxAUI when it comes to VTK. Hmm maybe I'll write an article about it... and finally get a Siafoo ranking higher than David.

One could actually use the wxWidgets documentations with wxPython but when it comes to wxAUI there is basically no docs... at all. Yes I could actually post on mailing lists and support forums but that implies waiting for hours or even days for a response. Anyway I still like and will probably use wxWidgets (and wxPython) in the future... just not for this project.

Comments

over 5 years ago (06 Jul 2009 at 09:43 PM) by Jenifer Irwin
Slightly off-topic, but: What is your opinion on tkinter? I've run into a couple issues with my own project that may be limitations of tkinter, and I've been considering moving to wxPython, but it's not a solid decision yet. I didn't know there was a qt toolset for python though.
over 5 years ago (06 Jul 2009 at 10:17 PM) by Stou S.
I have never used tkinter but from what I understand (and not to start a flamewar) it's a very simple and lightweight GUI toolkit meant mostly for easy-of-use instead of power... wxWidgets and Qt on the other hand are meant for serious application development and actually come with many other classes that aren't GUI related.

wxWidgets (what wxPython binds) is nice because it actually uses the native gui toolkit of the operating system... whereas Qt draws everything by itself (obviously in KDE... Qt _is_ the native toolkit)... but that usually doesn't matter. It appears that Qt has a steep learning curve but also a really nice free GUI designer (Qt Designer)... so far I like PyQt and there are a lot of examples that come with my distribution.

BTW wxPython is nice too and probably easier to use than Qt, I was just running into problems working with some esoteric stuff. If you stick with the 'normal' things you'll be fine.

Anyway check this out: http://wiki.python.org/moin/GuiProgramming