Re: PyGobject / GTK+ 3 support



> I guess someone who wants to support older distributions or non-linux
> systems
> will stick to PyGTK despite the advise to move to PyGObject (The good side
> of
> it is that there is much more documentation for PyGTK) and then jump to
> PyGObject / Gtk+ 3 when it is supported more widely.

One of the nice things about GTK+ programming in PyGObject is that its
documentation *is* the GTK+ documentation. Once you get used to the
naming convention, you know exactly how PyGObject maps the GTK+ API to
Python. Then, you really are calling the GTK+ functions themselves.

PyGTK requires extensive documentation because it has to override a
lot more, and in some cases, the Python API is very different from the
GTK+ API, particularly when it comes to "out" parameters and overrides
to mimic variadic functions. This leads to two problems which I think
PyGObject solves fairly nicely: (1) The PyGTK bindings can quickly
become out of date. The PyGTK bindings for GTK+ are up-to-date because
a lot of people use the GTK+ library. But, this is a huge problem for
less widely used libraries that utilize the GObject system. (2)
Separate, extensive documentation is required to describe all of the
artificial API functions.

PyGTK was a great project that provided the ability to call
GObject-based libraries from Python. PyGObject improves upon PyGTK by
addressing some of the lessons learned.

Daniel Trebbien


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