How to decide (and know) which Python GTK version to use?

Chris Green cl at
Mon Jul 30 11:45:16 EDT 2018

I want to decide which is the 'best' Python GTK to use on my Linux
(xubuntu) systems.  There seem to be quite a few versions of Python
GTK bindings out there and I'm confused!  

I wrote a Python GUI program a little while ago that uses Python GTK

    import gtk

I *think* this is probably GTK 2, or something.  I can't find the
proper documentation for this.  Is it old/obsolescent?

I'm just starting to write another program now and I seem to be using
GTK 3 (maybe!) by doing:-

    import gi
    gi.require_version('Gtk', '3.0')
    from gi.repository import Gtk

Is this the right/best place to be?

I know this is a bit of a "how long is a piece of string" question but
some guidance would be very welcome.  The stuff I write is purely for
my own use and will only ever run on Linux (mostly xubuntu but also
some other Debian derived systems such as Rasbian and Debian on

Chris Green

More information about the Python-list mailing list