Announcement: depikt - the minimalistic python gate to gtk

DreiJane joost at h-labahn.de
Fri Nov 20 11:51:10 CET 2009


Hi all,

these days i make depikt, a python C-extension for building apps with
gtk. It was a challenge for me and big fun. From its short description
on sourceforge.net:

"Python-3 wrappers for GTK. A minimalistic approach - just suited for
GUI-building of apps, in no way for widget-building. Currently 1250
lines for 15 widgets with about 100 methods ... "

depikt is advanced enough now to begin the transition of an 8MB python
app of me to it - simultaneously with the transition to Python-3 and
English. During this process depikt will grow to support for perhaps
25 widgets and 200 methods. From gobject it has connect(),
connect_after(), handler_block(), handler_unblock() and
handler_is_connected(). Still its status is marked as PreAlpha and
depikt not entered to the Python wiki, because
gtk_container_set_focus_chain() is defunct now - a vital method for
fine usable applications. It's difficult to find out why - as it is
the code was working for some time. depikt is very minimalistic:

No python attributes of its classes, let alone properties

No __repr__, no standard __init__

No support for set_property, get_property

No real class hierarchy, there is one abstract base class Pikt, from
which all concrete widgets are inheriting directly

No exposing of Glib to python (but all i need from pango, cairo and
gdk)

Thus the code is very petty, well understandable and easy to extend to
support for other widgets. That was the primary design goal, together
with exact control of encoding issues, support for Python-3 and
registry- and autoconf-free installation. Exception handling is about
average now - there no mimimalism is intended, quite the contrary (for
the long run). depikt will get to some mature state in 2010 - with
perhaps about 3.000 lines then. One C-file will always be sufficient.
atk might be added by means of a second file, also support for
gtk.TreeView might get an own file - but both directly inserted by
#include (no .h planned).

Enjoy, Joost



More information about the Python-list mailing list