[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linux/Windows GUI programming: tk or wx?

On 08/05/2017 04:52 AM, Chris Green wrote:
> I went through a similar process of deciding the easiest (for me) GUI
> to go with.  I've actually ended up with PyGtk as it feels for me the
> 'least foreign' compared with doing things the CLI way.

Yes PyGtk is fairly Pythonic and natural feeling. PyQt feels more like a
thin wrapper around the C++ API, because that's what it is.  In other
words you feel like you're programming in C++ using Python syntax.

Unfortunately the GTK3 bindings are much less pythonic than PyGTK
(GTK2).  The bindings work through the GTK introspection mechanism so
the resulting in a thinner abstraction layer, and exposing a bit more of
GTK's C-isms to you. It's been a while since I used it so I can't point
to a concrete example of what I mean, but it's just more of a general

The upside to the new binding system for GTK3 is that any library based
on Glib and GTK3 can be accessed via Python now, even third-party ones.

GTK2 is no longer under active development so if you still use PyGTK,
you really should start porting your projects to PyGObject and GTK3.

In the end I choose to use PyQt or PySide because Qt has the best
cross-platform support of all the toolkits.  Windows and Mac support in
GTK3 is there, but it lags way behind the Linux version. and it doesn't
integrate the look and feel as well as Qt does.