[pygtk] python and GTK+-3 - possible?
John Lumby
johnlumby at hotmail.com
Tue Mar 15 00:32:13 WST 2011
R Park wrote:
>
> On Sun, Mar 13, 2011 at 4:39 PM, John Lumby wrote:
> > Is it posible today, using some combination of python and pygtk-family packages
>
> Not with PyGTK. It is the intention of the maintainers that PyGTK dies
> a slow, gentle death alongside GTK2. The future of GTK3 is available
> in python through gobject-introspection in the pygobject package,
> thanks to the hard work of J5, Tomeu, et al.
>
Ah, thanks, that is reassuring.
Actually I meant the term "pygtk-family" to include pygobject,
since (I think) they share same home?
Anyway, would you please provide a little more detail on how I would
build and run the app? Do I specify
Gtk.require('3.0')
in the app? If not, at what point in the build/run process
does something tell something else to use GTK3 structures and libs instead of GTK2,
given they are both installed on my system?
Does it make any difference if I use Python2 or Python3, again given they
are both on my system. And, do you have an example or building and running?
My attempts to run my test app against GTK3 all fail with import errors, no doubt
because I have built and installed things myself, and I find it difficult to know what
is going on.
E.g. if I run using python (which is Python2.26) I get
ERROR:root:Could not find any typelib for Gtk
Traceback (most recent call last):
File "/home/lumby/pythonapps/togglegobj.py", line 20, in <module>
from gi.repository import Gtk
ImportError: cannot import name Gtk
And if I run using python3 I get
Traceback (most recent call last):
File "/home/lumby/pythonapps/togglegobj.py", line 20, in <module>
from gi.repository import Gtk
ImportError: No module named gi.repository
Cheers John
More information about the pygtk
mailing list