1 # Manifold API Python interface
4 from myslice.config import Config
10 def __init__(self, auth=None, cainfo=None):
14 self.server = config.manifold_server
15 self.port = config.manifold_port
16 self.path = config.manifold_path
21 self.multicall = False
22 self.url = config.manifold_url()
23 self.proxy = xmlrpclib.Server(self.url, verbose=False, allow_none=True)
25 def __getattr__(self, methodName):
26 def func(*args, **kwds):
27 result=getattr(self.proxy, methodName)(self.auth, *args, **kwds)
28 if debug: print methodName, self.auth, self.url,'->',result
33 def send_manifold_query (self, manifold_query):
34 (action,method)= (manifold_query.action,manifold_query.method)
36 return self.proxy.Get(self.auth, method, manifold_query.filters, {}, manifold_query.fields)
38 elif action=='others':