Glade-2 to .py

In a past life, I spent a lot of time with gtk-1 and glade (for a commercial app). After this experience, I tested several approach:

  • PyQT (using QTDesigner)
  • wxPython (w/ wxGlade)
  • Glade 2 + libglade

Here is my personnal feeling:

  • PyQT, is really great. But I really don’t like the licence. And since I work in a school, using this kind of licence with students is bad idea
  • wxPython + wxGlade is a great tool too. But but as usuall w/ wxPython the generated code isn’t cross-platform friendly. (And on Linux, the look is really bad ..)
  • Glade is a simple, and effective, but using libglade (loading the .glade at startup) isn’t really my favorite approach.

In my past life, we used to build IHM w/ glade-1 and produce the python code from a little script. This is easy and efficient. (and a newbie can learn python-gtk easily). I have been looking for the same stuff in gtk2 for a while. And last day, I found the article Writing PyGTK applications in a visual way . This is exactly what I’m looking for! So big thanks Tigrux !

Related Posts

5 thoughts on “Glade-2 to .py

  1. Hey Jerome,

    I have been looking myself at GUI tools in Python and I seem to be leaning towards exploring wxPython simply because it is cross-platform but you seem to think its the other way around. Can you please explain this point?


  2. In theory, wxPython is the most cross-platform friendly. But the reality is more cruel. In fact, the window’s version is always the bleeding edge, and commom apps usually need this version. So you need to install wxPython manually (and this is a really pain), and cannot use the default wxPython that’s come w/ your distro. And even worst, some distro use wxPython as the core GUI.. so you need to install it twice. (one for your dev by hand, another one ..)

    I wrote 2 (quite big) apps w/ wxPython, and both works well on Win32, and have some strange behaviours (or lacking some functionnality) on my Linux setup.

    In the other hand, wxPython support very-well, Win32. You can wrote some systray app for example.

    I think my next app, will use GTK2. I know this is working quite very well on Win32 right now. But always keep in mind that Gtk + thread = nightmare + segfault (and even worst on Win32)

    – Hope this helps;

  3. First of all – I’d recommend just using rather than generating code. What’s the advantage of introducing an extra build step into your application, and bloating it up with twice as much code? Plus, it’s too tempting to go edit the generated code, which means you can kiss further use of Glade to fix your UI goodbye.

    As to PyGTK2 working on windows, here are some screenshots (not of the Py part, but of the Gtk part – and PyGTK does work):

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>