Re: [orca-devel] New gnomegoal: port PyGTK apps to PyGI
- From: Joseph Scheuhammer <clown utoronto ca>
- To: gnome-accessibility-list gnome org, orca-devel-list gnome org
- Subject: Re: [orca-devel] New gnomegoal: port PyGTK apps to PyGI
- Date: Mon, 21 Jun 2010 14:44:30 -0400
To answer my own question: it looks like a combination of "yes" and "no".
There are definitely changes in how to imports modules. For example,
> import gtk # old
> from from gi.repository import Gtk # new
Also, the name of the module is now in upper case. Thus, one no longer
writes "gtk.main()" but "Gtk.main()".
It looks like method names stay the same, for example if "foo" is a
checkbox, use foo.set_active() to make that checkbox checked.
Still, there are a number of "constants" that are referenced differently:
> Gdk.screen_width # old
> Gdk.Screen.width # new
The differences are documented in this script:
http://git.gnome.org/browse/pygi/tree/pygi-convert.sh
--
;;;;joseph
'Clown control to Mao Tse Tung.'
- D. Bowie (misheard lyric) -
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]