PyGObject 3.0 has been released!!! This is the stable release we have all been waiting for. 3.0 has been stabilizing for some time. This marks a huge improvement over the 2.28 branch in terms of speed, stability and GObject API coverage. With this release PyGObject remains the most complete language bindings for developing application with GObject Introspection.
I want to thank everyone who has been a part of this release, from those who reported bugs to those who submitted large patches, and also those who cheered us on from the sidelines or gave us support in other areas. At this point in the project they are just too many to list so I won’t, in fear that I may accidentally leave people out.
Highlights Since 2.28
- New rewritten invoker is twice as fast and easier to extend and debug
- Complete break from static bindings so we may improve the core without breaking legacy APIs
- Better type handling
- Parallel installable with PyGObject 2.28 for legacy binding support (2.28 must be compiled with –disable-introspection)
- Support for function calling using keyword arguments
- Support for multiple arrays referencing a single length parameter (e.g. Clutter.Actor.animatev)
- Once again we support Windows builds with some caveats
Going Forward
As we move into another unstable cycle there are a number of goals we will strive for the next major release.
- Documentation – we jump started this at the Desktop Summit but a lot of work is needed to get this to the quality currently exhibited by the PyGTK bindings.
- Full Gtk subclassing – We are almost there but we still need support for calling C callbacks in Python to support overriding interfaces such as Gtk.Widget.for_all()
- Getting rid of all legacy marshallers – currently they are still being used for marshalling vfuncs and signals
- Cutting out the middle man – We should get rid of our dependency on GArguments and marshal directly to FFI
- Moving away from a Gtk+ focus – Clutter and GStreamer 1.0 are just as important to fully support
- Full Gio support – right now dealing with byte streams isn’t completely introspectable
ChangeLog http://download.gnome.org/sources/pygobject/3.0/pygobject-3.0.0.changes (1.34K) Download http://download.gnome.org/sources/pygobject/3.0/pygobject-3.0.0.tar.xz (530K) sha256sum: ef6735792b0d44287126a6a3b181c85559849063d770506fe06848adb87ce815 http://download.gnome.org/sources/pygobject/3.0/pygobject-3.0.0.tar.bz2 (629K) sha256sum: 5682603c58be67e336e8cfaf19d6321158425797a7da12f646cc8706508ab95c
About PyGObject
GObject is a object system used by GTK+, GStreamer and other libraries.
PyGObject provides a convenient wrapper for use in Python programs when accessing GObject libraries.
Like the GObject library itself PyGObject is licensed under the GNU LGPL, so is suitable for use in both free software and proprietary applications. It is already in use in many applications ranging from small single purpose scripts up to large full featured applications.
PyGObject now dynamically accesses any GObject libraries that uses GObject Introspection. It replaces the need for separate modules such as PyGTK, GIO and python-gnome to build a full GNOME 3.0 application. Once new functionality is added to gobject library it is instantly available as a Python API without the need for intermediate Python glue.
[read this post in: ar de es fr it ja ko pt ru zh-CN ]
Not sure where to submit this, hope this is a viable place. Wanted to modify drawingarea.py example to clear the scribble area on right-click. Came up with the following:
— drawingarea.py 2011-10-09 15:01:04.089450215 -0500
+++ dr1.py 2011-10-10 08:20:54.574483271 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- Mode: Python; py-indent-offset: 4 -*-
# vim: tabstop=4 shiftwidth=4 expandtab
#
@@ -54,7 +54,7 @@
# create checkerboard area
label = Gtk.Label()
- label.set_markup(’Scribble area’)
+ label.set_markup(’Checkerboard pattern’)
vbox.pack_start(label, False, False, 0)
frame = Gtk.Frame()
@@ -68,7 +68,7 @@
# create scribble area
label = Gtk.Label()
- label.set_markup(’Checkerboard pattern’)
+ label.set_markup(’Scribble area’)
vbox.pack_start(label, False, False, 0)
frame = Gtk.Frame()
@@ -117,7 +117,7 @@
if ycount % 2:
cairo_ctx.set_source_rgb(0.45777, 0, 0.45777)
else:
- cairo_ctx.set_source_rgb(1, 1, 1)
+ cairo_ctx.set_source_rgb(1,1,1)
# If we’re outside the clip this will do nothing.
cairo_ctx.rectangle(i, j,
check_size,
@@ -195,6 +195,22 @@
if event.button == 1:
self.draw_brush(da, event.x, event.y)
+ # I want to right-click to clear the scribble drawingarea
+ elif event.button == 3:
+ update_rect = Gdk.Rectangle()
+ update_rect.x = 0
+ update_rect.y = 0
+ update_rect.width = da.get_allocated_width()
+ update_rect.height = da.get_allocated_height()
+
+ # paint to the surface where we store our state
+ cairo_ctx = cairo.Context(self.surface)
+ cairo_ctx.set_source_rgb(1, 1, 1)
+ Gdk.cairo_rectangle(cairo_ctx, update_rect)
+ cairo_ctx.fill()
+
+ da.get_window().invalidate_rect(update_rect, False)
+
return True
def main(demoapp=None):
Comment by RockDoctor — October 10, 2011 @ 9:34 am