Re: [pygtk] gtk/pygobject api question



On Fri, 2011-03-04 at 21:32 +0100, Tom Cato Amundsen wrote:
> It is explained somewhere how the API will change from pygtk to
> gtk+pygobject? I'm trying to port GNU Solfege using python-gobject
> 2.27.91 and gobject-introspection 0.10.3 in ubuntu natty.
> 
> With pygtk I would do this:
>        sizegroup = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
> 
> With gtk + pygobject it requires two lines:
>        sizegroup = Gtk.SizeGroup()
>        sizegroup.set_mode(Gtk.SizeGroupMode.HORIZONTAL)
> 
> I have had the impression that using python and pygobject would make
> the python api closer to C. On
> http://library.gnome.org/devel/gtk/stable/GtkSizeGroup.html I can see
> that gtk_size_group_new take one argument, the GtkSizeGroupMode, so I
> would expect I could set the direction (horizontal/vertical) in the
> constructor. But I can't.
> 
> Is the gtk+pygobject pretty stable now? Will it become closer to the
> pygtk api, or should I just port to what we have now? There are other
> changes too, like Box.pack_start that don't have optional arguments
> any more. Is this what it will be when it is final, or can I expect
> optional arguments in methods like in pygtk?

Maximizing compatibility with PyGTK is a goal, or minimizing the porting
effort where possible, so if this is missing please file bugs against
PyGObject (component: introspection)

I have also CC'd python-hackers mailing list as this is where discussion
relating to pygobject and gobject-introspection is preferred.

John

> 




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