GIO python bindings

7:17 am Blogroll, GNOME, General, PyGTK, Python, olpc

Late yesterday evening I did a new release of pygobject. The first one in about 10 months, I should do this more often I know. The most important thing featured in this release is the addition of GIO bindings. I know lots of you out there have been asking for this.

There’s still no official documentation included, but there’ll be in the near future as we have a couple of people working on it. While you wait, enjoy this simple example:

import gio
fp = gio.File("http://planet.gnome.org")
data = fp.read()
print data

We have also moved the code generator from PyGTK into PyGObject, this means that GObject bases libraries can be wrapped in python without having to depend on GTK+, this should be quite useful, I think.

I’d especially thank Paul Pogonyshev (doublep on irc) for this work on this release, he’s getting more and more involved in both PyGTK and PyGObject, thanks Paul!

7 Responses

  1. Götz Says:

    It would be nice if this was already available on the GNOME FTP server, but it isn’t yet.

  2. johan Says:

    Göts: oops, I knew I forgot something :-) I just finished uploading them so they should be available shortly!

  3. Marius Gedminas Says:

    Oooh, this is cool!

  4. aklapper Says:

    Thanks a lot for releasing!

  5. Gabriel Falcão Says:

    Muito legal!
    Com o codegen dentro do pygobject vai ficar mais bonito criar bindings pra python de coisas “GObjectic”.
    Mais feliz que isso, só ficarei quando o pybank estiver 100% funcional :)

    Thanks a lot!

  6. kenjiru Says:

    This is good news. Thank you!

  7. Tarun Says:

    Johan, I am new to Gnome programming. Would you have any idea as to how would one add a custom filesystem using GIO and also get it to show in nautilus? The GIO (C) reference indicates that I need to fiddle about with GFile and GVfs structures, but I can’t figure out where to start…