Re: Problem with GI and pygtk
- From: Simon Feltman <s feltman gmail com>
- To: Thomas Martitz <kugel rockbox org>
- Cc: "python-hackers-list gnome org" <python-hackers-list gnome org>
- Subject: Re: Problem with GI and pygtk
- Date: Wed, 13 Aug 2014 14:08:11 -0700
On Wed, Aug 13, 2014 at 9:23 AM, Thomas Martitz <kugel rockbox org> wrote:
Hello,
my name is Thomas and I'm a computer scientist from Berlin, working in the
embedded industry. In my spare time I work in the Geany IDE and Rockbox.
Hi Thomas,
I'm struggling to make pygtk work with a library that provides gir bindings.
I read that pygtk is based on pygobject and therefore I would expect that
pygtk would work together with other GI libraries (perhaps in a limited
fashion).
PyGTK is based on PyGObject 2. Introspection (gir bindings) requires
PyGObject 3 (or PyGI) which provides the "gi" Python package.
Unfortunately mixing these doesn't work. The "Test" typelib in your
sample returns an introspection bound GTK+ 2 widget while the Python
code imports PyGTK (statically bound GTK+ 2).
Howver, you can use introspection based GTK+ bindings with your own
introspection typelibs. GTK+ 2 is probably not going to work very well
so I recommend GTK+ 3. Resources and documentation links are available
here [1]. If you are trying to integrate your own typelib with
existing PyGTK code, you might be able to get away with using
pygtkcompat [2].
-Simon
[1] https://wiki.gnome.org/Projects/PyGObject
[2] https://wiki.gnome.org/Projects/PyGObject/IntrospectionPorting
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]