Re: PyGobject / GTK+ 3 support



Thu, 02 Feb 2012 18:15:35 -0500 (EST)
John Palmieri a écrit:

> > > Does using PyGobject necessary mean doing GTK+ 3 ?
> > 
> > No. You can write GTK+ 2 applications using PyGObject. There is a
> > special require_version() function in the `gi` package that you can
> > use to specify the version of GTK+ that PyGObject will bind for.

[...]

> > import gi
> > gi.require_version("Gtk", "2.0")
> > 
> > from gi.repository import Gtk

[...]
 
> However, you must be aware that Gtk+ 2 is not supported and there are
> places where the annotations are seriously lacking.  We still suggest PyGtk
> for Gtk+2 applications.

So one can use PyGObject with GTK+ 2 but it is not supported and anyway, the
user would still need python-gi to run the program.

I understand that python-gi is the new name for python-gobject, starting from
python-gobject version 3, which corresponds to 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.

As I said, I didn't find any reliable source saying it, but the information I
gathered on different not so old messages on the net make me think there is
no support for gi on Windows (perhaps even for GTK+ 3 itself). I don't know
about OS X.

Thank you both for your answers.

-- 
Jérôme


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