I was hinting at something like this when I began. On the python side you have a function which passes variable signal names and params and likewise on the javascript side. Somthing like:
def sendDelegate(name, [args])
pyotherside.send(name, arg, arg, etc)
And a generalization on the other side:
function setHandlerDelegate(name [args]) {
setHandler(name, args);
}
I haven’t the time right now, but will give something like this a crack.