Re: What is the significance of pygtk.require('2.0')?



----- "Robert Park" <rbpark exolucere ca> wrote:

> On Fri, Oct 29, 2010 at 1:12 AM, John Palmieri <johnp redhat com>
> wrote:
> > It is really hard to support Gtk 2 in GI since there is a lot of
> arbitrary C code that can't be wrapped.  We aren't dropping Gtk 2 per
> se.  The plan is to keep PyGtk working for Gtk 2 and have PyGI focus
> on Gtk 3.  You can sort of use it for Gtk 2 but things like style
> structures will not work and there is just a lot of API that isn't
> annotated correctly.  Here is the support matrix:
> >
> > Gtk2 -> Python 2 -> PyGTK (maintenance mode mostly)
> > Gtk3 -> Python 3 -> PyGI (though Python 2 support has been easy to
> maintain and I'm really the only person developing on Python 3 as of
> now)
> 
> So I've already gone through the pygtk->pygi porting pain, how
> painful
> is gtk2->gtk3, or for that matter python2->python3 going to be?

If your app is running under PyGI and gtk2 without crashing most likely it will run fine with Gtk 3.  There are a couple of removed API's but most of them don't work in GI anyway.  Also some of the low level Gdk stuff has been removed.  In particular the drawing functions which are now exclusively cairo.  As for Python 3, like I said we are trying to keep Python 2 compat but we don't guarantee that for future releases.  There are a couple of syntax changes that you have to be aware of - http://wiki.python.org/moin/PortingPythonToPy3k

--
John (J5) Palmieri
Software Engineer
Red Hat, Inc.


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