Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I'm completly confused with PyObject, PyGTK and GNOME 3 as well

I installed Fedora 15 to use Python3 and GObject to develop a desktop-application, because PyGTK looks outdated:

PyGTK 2.24.0 released Friday 01 April 2011 by Rafael Villar Burke PyGTK 2.24.0 has been released. This is a stable release supporting the GTK+ 2.24 API. New users wishing to develop Python applications using GTK+ are recommended to use the GObject-Introspection features available in PyGObject.[...]

PyGobject 2.26.0 has been released. This is the first stable release in the 2.26.x series and introduces initial support for introspection and Python 3. [...]

Source: http://www.pygtk.org/

I thought STRIKE! using Python 3 and PyGObject to develop new Gnome3 Applications! I visited the PyGObject Page and saw that the newest stable Version is 2.28 (and Python3 is supported since 2.26) which is installed on Fedora, BUT only with python2 bindings.

What the heck?

I visited the PyGobject demos and Examples on the Site, and looked at the source and every code there is using pygtk + pygtk.require('2.0'), instead of pygobject.

Am I missing something? How can I use Python3 and PyGObject to develop Gnome 3 Apps?

like image 843
quantez Avatar asked Jun 18 '11 17:06

quantez


2 Answers

Update: there is a bit of documentation here: The Python GTK+ 3 Tutorial. It's still missing anything to do with GIO, etc.

It's not... er, impossible... but because you're talking about the latest generation of GTK (&co) bindings, things are bound to be a bit behind. Developer effort is mostly directed at actual development, and documentation, examples, etc. tend to catch up much later. Such is the reality of free software :/ Remember that PyGI was merged into PyGObject rather recently, too, so there's yet another discontinuity to edit out of history.

So my answer to you is:

  1. Subscribe to the PyGTK/PyGObject mailing lists, ask for some pointers or reference material or hand-holding and go from there. A constant channel to the developers is really the only way to stay on top of things.
  2. Keep this moment (and that guy's facial expression) tucked away in a corner of your brain, so that when you're up to speed, you — yes you, sir, YOU — can write some of this stuff down and submit it as documentation for the next hapless soul who is in this situation.

(Personally, I can't wait to put some time aside to try putting something together with the new API, but I'm trying to defer until Gnome 3 is in Debian. I eagerly await wearing such expressions on my face.)

like image 85
detly Avatar answered Oct 12 '22 23:10

detly


The platform demos on developer.gnome.org are fully written in GTK 3 and GNOME 3. At the moment there are only two available for Python, the others haven't been translated yet, but that should get you started.

Unfortunately, even years after GTK 3 is commonplace, you will still run into PyGTK 2 tutorials online, because people write them in a flash of enthusiasm and never update them again. Nobody will take them down either, because there still might be valuable material in them, and you only have to change X, Y, and Z to get it to work with GTK 3... This is why you can still find C tutorials for GTK 1.2 online.

So if you find a tutorial for PyGTK 2, you would do well to write an e-mail to whoever is hosting it, telling them it's out of date. Better still, update the tutorial for GTK 3 and send them a new version! It is, after all, open source.

like image 34
ptomato Avatar answered Oct 12 '22 23:10

ptomato