[cairo] Lander Game

Alex Mac lots.of.mailing.lists at gmail.com
Mon Jan 8 15:18:42 PST 2007

On 08/01/07, Carl Worth <cworth at cworth.org> wrote:
> On Sun, 7 Jan 2007 16:25:56 +0000, "Alex Mac" wrote:
> > I'm sure the code has ample room for optimisation so please have a
> > look and tell me if I'm doing something wrong. As Carl said in the
> > other thread it might prove to be a useful testcase for cairo.
> Hi Alex,
> I still agree this will be an interesting test case, (particularly if
> I can do some cairo and QT comparisons with it). But so far I've
> haven't gotten it to do much. Here's where I'm at so far:
> QT lander
> ---------
>         $ python ./lander-qt4.py
>         Traceback (most recent call last):
>           File "./lander-qt4.py", line 13, in ?
>             from PyQt4.QtOpenGL import *
>         ImportError: No module named QtOpenGL
> Is OpenGL a requirement for running the QT-based lander? Anything I
> can do otherwise?

I'm not sure what distro you are using but on ubuntu "sudo apt-get
install python-qt4-gl" should fix that

> GTK+ lander
> -----------
> At first I was getting failures trying to import the rsvg module. I
> then installed gnome-python-desktop from CVS, (my system had 2.14
> before that---apparently without rsvg). I can get it to run now, but I
> get the following error message:
>         $ python ./lander-gtk.py
>           self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
>         Traceback (most recent call last):
>           File "/home/alex/python/Lander/GTK/Window.py", line 50, in Animate
>         AttributeError: 'gtk.gdk.Window' object has no attribute 'invalidate_region'
> The result is a program that displays the rocket and the background,
> but it's completely static.
> Any idea on what I might be missing here?

are you running an old version of Gtk?

I'm using Gtk 2.10.6 and gnome-python-desktop 2.17.1

> -Carl

More information about the cairo mailing list