def my_xmlrpclib_loads(data): """ Modification of Python 2.3 xmlrpclib.loads() that does not do an import. Needed to prevent deadlocks. """ p, u = xmlrpclib.getparser() p.feed(data) p.close() return u.close(), u.getmethodname()
def __call__(self, *args): """ Method is being called """ # Forge the request request = xmlrpclib.dumps(args, self.__name, encoding='utf-8', allow_none=True) # Send it reply_message = self.__send(self.__peer, self.__subject, request) # Parse the reply parser, unmarshaller = xmlrpclib.getparser() parser.feed(reply_message.content) parser.close() return unmarshaller.close()
def getparser(self): return xmlrpclib.getparser()
def xml_loads(data): p, u = xmlrpclib.getparser() p.feed(data) p.close() return u.close()
def __init__ (self, cache = 0): self.parser, self.buf = xmlrpclib.getparser() self.fp = BytesIO () self.cache = cache self.cdata = None