Add missing bits to the python binding

So much copy-paste. Ah well.