-def rpc_call(cmd, **kwargs):
- call = xmlrpclib.dumps(sum(kwargs.items(), ()), cmd)
- write(call + '\n')
- resp = rpc_read(lambda resp: resp)
-
-class SimpleStdinOutXMLRPCHandler(SimpleXMLRPCDispatcher):
-
- def __init__(self, allow_none=False, encoding=None):
- if SimpleXMLRPCDispatcher.__init__.func_code.co_argcount == 1:
- # python2.4 and before only took one argument
- SimpleXMLRPCDispatcher.__init__(self)
- else:
- SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)
-
- def process_request(self, req):
- write(self._marshaled_dispatch(req))
-
- def handle_request(self):
- def processor(req):
- self.process_request(req)
- while True:
- ret = rpc_read(processor)
- if ret is not None: return ret
-
-def rst2html(*kwargs):