예제 #1
0
 def listMethods(self):
     result = set()
     for name, handler in self._xmlrpc_server.register.items():
         methods = list_public_methods(handler)
         methods = set('%s.%s' % (name, method) for method in methods)
         result.update(methods)
     return sorted(result)
예제 #2
0
파일: server.py 프로젝트: mgracik/robinette
 def listMethods(self):
     result = set()
     for name, handler in self._xmlrpc_server.register.items():
         methods = list_public_methods(handler)
         methods = set('%s.%s' % (name, method) for method in methods)
         result.update(methods)
     return sorted(result)
예제 #3
0
 def register_with(cls, dispatcher):
     """Adds this API's methods to the given dispatcher."""
     for method_name in list_public_methods(cls):
         if method_name != 'register_with':
             method = getattr(cls, method_name)
             full_name = '.'.join((part for part in (cls.namespace, method_name) if part))
             dispatcher.register_function(method, full_name)
예제 #4
0
    def listMethods(self):
        """
            Hack to return public methods of this object via XMLRPC

            :TODO:
                - Make this work
        """
        return list_public_methods(self)
예제 #5
0
 def _listMethods(self):
     """
     Class method listing (required for introspection API).
     """
     m = []
     for x in list_public_methods(self):
         if x.startswith("_"): continue
         if not is_exposed(getattr(self, x)): continue
         m.append(x)
     return m
예제 #6
0
 def _listMethods(self):
     """
     Class method listing (required for introspection API).
     """
     m = []
     for x in list_public_methods(self):
         if x.startswith("_"): continue
         if not is_exposed( getattr(self, x) ): continue
         m.append(x)
     return m
예제 #7
0
 def _listMethods(self):
     return list_public_methods(self)
예제 #8
0
파일: loongd.py 프로젝트: kingofoz/Loong
 def _listMethods(self):
     return list_public_methods(self)
예제 #9
0
파일: server.py 프로젝트: mgracik/robinette
    def get_public_method(self, method):
        if method not in list_public_methods(self):
            raise AttributeError('Method %r not available' % method)

        return getattr(self, method)
예제 #10
0
    def get_public_method(self, method):
        if method not in list_public_methods(self):
            raise AttributeError('Method %r not available' % method)

        return getattr(self, method)
예제 #11
0
 def _listMethods(self):
     """The convenience function list_public_methods() scans an instance to return the names of callable attributes that do not start with an underscore."""
     # redefine _listMethods() to apply whatever rules are desired.
     return list_public_methods(self)
 def _listMethods(self):
     """The convenience function list_public_methods() scans an instance to return the names of callable attributes that do not start with an underscore."""
     # redefine _listMethods() to apply whatever rules are desired.
     return list_public_methods(self)