Main Contents

bug in python-opengl + mesa

August 20, 2008

Since like forever, I have never succeed in executing python-opengl demos on debian lenny.  It always segfault during glutInitDisplayMode.  After some debugging, here is why.
One should be able to call glGetError at any time.  If there’s nothing wrong, it should just return something like GLNOERROR.  Any raw (native) function call in python-opengl, no matter it […]

Filed under: OpenGL, C, python | Comments (0)

generate object methods at runtime

June 19, 2008

I have been working on a dialer button class since yesterday. It makes sense to use the command design pattern here, and I want to separate the commands and the buttons so I can change the functionality of every button at runtime.
So we are talking about something like this:
class DialerButtons:
def […]

Filed under: programming, python | Comments (0)

python-efl on ubuntu gutsy

June 14, 2008

hey if you have a extremely slow laptop (Pentium III) like me yet you still want to use python-efl on it, here is how.
first, compiling the whole e17 from scratch is not an option. it will take forever. there’s a ubuntu package repository for e17:
$ cat /etc/apt/sources.list.d/e17.list
deb http://e17.dunnewind.net/ubuntu gutsy e17
deb-src http://e17.dunnewind.net/ubuntu gutsy e17
$ […]

Filed under: python | Comments (3)

A small tip for PIL

September 20, 2007

PIL stands for Python Imaging Library. It is fairly useful when it comes to handling images under python. However, it comes with a pet peeve to me: the show() method of a Image object will execute sh xv <imagefile>I don’t have xv installed on my system, neither do I want to […]

Filed under: python | Comments (0)

Hello World?

September 13, 2007

Guess this is appropriate for a blog about software.
>>> print “Hello, world!”
Hello, world!

Filed under: programming, python | Comments (0)