plugins/python/modules/svgui/pyjs/jsonrpc/web2py/jsonrpc.py
author Edouard Tisserant
Thu, 06 Oct 2011 22:39:05 +0200
changeset 622 885a224a35be
parent 371 b7cb57a2da08
permissions -rw-r--r--
runtime's process cwd should now be the same as provided working dir, fixin permission problem on W7
from pyjs.jsonrpc import JSONRPCServiceBase

class JSONRPCService(JSONRPCServiceBase):

    def serve(self):
        return self.process(request.body.read())

    def __call__(self,func):
        self.methods[func.__name__]=func
        return func