py_ext/modules/svgui/pyjs/jsonrpc/web2py/jsonrpc.py
changeset 721 ecf4d203c4d4
parent 717 1c23952dbde1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/py_ext/modules/svgui/pyjs/jsonrpc/web2py/jsonrpc.py	Tue May 08 17:08:45 2012 +0200
@@ -0,0 +1,11 @@
+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
+