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

Chris Green cl at isbd.net
Mon Jul 30 12:38:28 EDT 2018


Chris Green <cl at isbd.net> wrote:
> 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
> with:-
> 
>     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
> Beaglebone).
> 
Further to the above the following page:-

    https://docs.python.org/3/library/othergui.html

Seems to muddy the water even further as the links don't *seem* to
take one to the places one would expect them to go to.  The PyGObject
link goes to https://wiki.gnome.org/Projects/PyGObject and the PyGtk
link goes to https://pygobject.readthedocs.io/en/latest/ which would
also appear to be pygobject.

-- 
Chris Green
·



More information about the Python-list mailing list