A python classproperty

In rare occassions I need a property on a classmethod. Until now I've only needed getter-access (setting properties on classes dynamically is scary anyway). Here's my implementation:

def classproperty(f):
        >>> class foo(object):
        ...    @classproperty
        ...    def name ...
Continue reading

Pure lambda calculus in Python

I've always been amazed by lambda calculus (the way it was tought to me at the university). A while ago (actually more than ten years, it turns out) I attempted to implement some pure lambda calculus in Python.

I ...

Continue reading

Django trick: getting a readable traceback

When working/debugging with Django, there may be cases where you get the full (debug) HTML error template. For example, when using pdb on client code that invokes a django view.

It's really hard to get the actual error ...

Continue reading

Fixing "fake initctl" on new ubuntu 12.10 install

In case anyone runs in the same weird issue as me and searching for this error: 

I just installed Ubuntu 12.10 "Quantal Quetzal" (server) on a small cdrom/floppyless system. I created a bootable usb drive using "unetbootin" (needed ...

Continue reading