当前位置: 首页>>代码示例>>Python>>正文


Python SimpleXMLRPCDispatcher.__init__方法代码示例

本文整理汇总了Python中SimpleXMLRPCServer.SimpleXMLRPCDispatcher.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python SimpleXMLRPCDispatcher.__init__方法的具体用法?Python SimpleXMLRPCDispatcher.__init__怎么用?Python SimpleXMLRPCDispatcher.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SimpleXMLRPCServer.SimpleXMLRPCDispatcher的用法示例。


在下文中一共展示了SimpleXMLRPCDispatcher.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
 def __init__(self, no_introspection=False):
     if sys.version_info[:2] < (2, 5):
         SimpleXMLRPCDispatcher.__init__(self)
     else:
         SimpleXMLRPCDispatcher.__init__(self, False, 'utf-8')
     if not no_introspection:
         self.register_introspection_functions()
开发者ID:UfSoft,项目名称:screener,代码行数:9,代码来源:__init__.py

示例2: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
 def __init__(self):
     #: Python 2.5 requires some arguments like `allow_none`
     #: and the encoding. Python 2.4 and 2.3 doesn't.
     if sys.version_info[:2] < (2, 5):
         SimpleXMLRPCDispatcher.__init__(self)
     else:
         SimpleXMLRPCDispatcher.__init__(self, True, 'utf-8')
开发者ID:7thStreet,项目名称:lodgeit,代码行数:9,代码来源:xmlrpc.py

示例3: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
 def __init__(self, path):
     path = to_unicode(path)
     SimpleXMLRPCDispatcher.__init__(self, True, 'utf-8')
     self.register_introspection_functions()
     self.register_multicall_functions()
     self.instance = self.instance_class(path)
     self.path = path
开发者ID:nsi-iff,项目名称:pyOLS,代码行数:9,代码来源:main.py

示例4: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
    def __init__(self, requestHandler, logRequests=True, allow_none=False,
                 encoding=None):
        self.logRequests = logRequests

        SimpleXMLRPCDispatcher.__init__(self, allow_none=allow_none,
                                        encoding=encoding)
        ConnectedTCPServer.__init__(self, requestHandler)
开发者ID:Caez83,项目名称:vdsm,代码行数:9,代码来源:xmlrpc.py

示例5: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
 def __init__(self, allow_none=False, encoding=None):
     try:
         SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)
     except TypeError:
         # see http://bugs.debian.org/470645
         # python2.4 and before only took one argument
         SimpleXMLRPCDispatcher.__init__(self)
开发者ID:chrismgray,项目名称:ikiwiki,代码行数:9,代码来源:proxy.py

示例6: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
    def __init__(self, registerInstance, server_address, keyFile=DEFAULTKEYFILE,
            certFile=DEFAULTCERTFILE, caFile = DEFAULTCAFILE, logRequests=True):
        """Secure Documenting XML-RPC server.
        It it very similar to DocXMLRPCServer but it uses HTTPS for transporting XML data.
        """
        SimpleXMLRPCServer.__init__(self, server_address, SecureXMLRPCRequestHandler, logRequests)
        self.logRequests = logRequests

        self.register_introspection_functions()

        # init stuff, handle different versions:
        try:
            SimpleXMLRPCDispatcher.__init__(self)
        except TypeError:
            # An exception is raised in Python 2.5 as the prototype of the __init__
            # method has changed and now has 3 arguments (self, allow_none, encoding)
            SimpleXMLRPCDispatcher.__init__(self, False, None)
        SocketServer.BaseServer.__init__(self, server_address, SecureXMLRPCRequestHandler)
        self.register_instance(registerInstance) # for some reason, have to register instance down here!

        # SSL socket stuff
        ctx = SSL.Context(SSL.SSLv23_METHOD)
        ctx.use_privatekey_file(keyFile)
        ctx.use_certificate_file(certFile)
        # verify
        ctx.load_verify_locations(caFile)
        ctx.set_verify(SSL.VERIFY_PEER|SSL.VERIFY_FAIL_IF_NO_PEER_CERT, self._verify)
        self.socket = SSL.Connection(ctx, socket.socket(self.address_family, self.socket_type))
        self.server_bind()
        self.server_activate()

        # requests count and condition, to allow for keyboard quit via CTL-C
        self.requests = 0
        self.rCondition = Condition()
开发者ID:hizel,项目名称:twistsnmp,代码行数:36,代码来源:securexmlrpc.py

示例7: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
	def __init__(self,application, request, transforms=None):
		tornado.web.RequestHandler.__init__(self,application, request, transforms)

		SimpleXMLRPCDispatcher.__init__(self,True,None)

		self.register_multicall_functions()

		self.register_methods()
开发者ID:leadernux,项目名称:etornado,代码行数:10,代码来源:xmlrpc.py

示例8: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
 def __init__(self, clientHost, clientPort):
     SimpleXMLRPCDispatcher.__init__(self)
     ThreadingTCPServer.__init__(self,
                                 (clientHost, clientPort),
                                 SimpleXMLRPCRequestHandler)
     self.logRequests = 1
     self.client = AdminControlInterface()
     self.register_introspection_functions()
     self.register_instance(self.client)
开发者ID:giffels,项目名称:PRODAGENT,代码行数:11,代码来源:AdminControlServer.py

示例9: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
 def __init__(self, addr, requestHandler=RequestHandler):
     self.logRequests = 0
     if os.path.exists(addr):
         os.unlink(addr)
     dir = os.path.dirname(addr)
     if not(os.path.exists(dir)):
         os.makedirs(dir)
     SimpleXMLRPCDispatcher.__init__(self)
     UnixStreamServer.__init__(self, addr, requestHandler)
开发者ID:robhoes,项目名称:xapi-storage,代码行数:11,代码来源:__init__.py

示例10: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
    def __init__(self, requestHandler=IPXMLRPCRequestHandler,
                 logRequests=False, allow_none=False, encoding=None):
        SimpleXMLRPCDispatcher.__init__(self, allow_none=allow_none,
                                        encoding=encoding)

        self.requestHandler = requestHandler
        self.logRequests = logRequests

        # TODO provide proper limit for this queue
        self.queue = TaskQueue(sys.maxint)
开发者ID:fancyKai,项目名称:vdsm,代码行数:12,代码来源:xmlrpc.py

示例11: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
 def __init__(self):
     try:
         # older Pythons like 2.4.3 demand a single parameter
         # newest Python versions handle 1, 2 or 3 parameters
         # supplying defaults for the 2nd and 3rd
         SimpleXMLRPCDispatcher.__init__(self)
     except:
         # some mid-age Python versions demand 3 parameters without
         # offering default values for the 2nd and 3rd
         SimpleXMLRPCDispatcher.__init__(self, False, None)
开发者ID:Lewiswight,项目名称:4CT-GW--master,代码行数:12,代码来源:xmlrpc.py

示例12: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
    def __init__(self, allow_none=True, encoding=None):
        if sys.version_info[:2] == (2, 4):
            # doesn't support extra args in python 2.4
            SimpleXMLRPCDispatcher.__init__(self)
        else:
            SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)

        self.allow_none = allow_none
        self.encoding = encoding
        self.register_multicall_functions()
开发者ID:jhornice,项目名称:preupgrade-assistant,代码行数:12,代码来源:dispatcher.py

示例13: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
    def __init__(self, addr, requestHandler=DroidPresRequestHandler, logRequests=False, allow_none=False, encoding=None, bind_and_activate=True):
        self.logRequests = logRequests

        SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)
        ThreadingTCPServer.__init__(self, addr, requestHandler, bind_and_activate)

        if fcntl is not None and hasattr(fcntl, 'FD_CLOEXEC'):
            flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD)
            flags |= fcntl.FD_CLOEXEC
            fcntl.fcntl(self.fileno(), fcntl.F_SETFD, flags)
开发者ID:Alex-Fill,项目名称:droidpres,代码行数:12,代码来源:xmlrpcserver.py

示例14: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
        def __init__(self, addr, requestHandler, 
                 logRequests, allow_none, encoding, bind_and_activate):
            self.logRequests = logRequests

            SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding)
            ForkingTCPServer.__init__(self, addr, requestHandler, bind_and_activate)

            if fcntl is not None and hasattr(fcntl, 'FD_COLEXEC'):
                flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD)
                flags |= fcntl.FD_COLEXEC
                fcntl.fcntl(self.fileno(), fcntl.F_SETFD, flags)
开发者ID:xuechao8086,项目名称:tinyhttpd,代码行数:13,代码来源:rpcsvr.py

示例15: __init__

# 需要导入模块: from SimpleXMLRPCServer import SimpleXMLRPCDispatcher [as 别名]
# 或者: from SimpleXMLRPCServer.SimpleXMLRPCDispatcher import __init__ [as 别名]
	def __init__(self, apis):
		SimpleXMLRPCDispatcher.__init__(self, True, 'utf-8')
		funcs = {}
		for api in apis:
			prefix = api.prefix
			for attr_name in dir(api):
				attr = getattr(api, attr_name)
				if callable(attr):
					funcs[prefix + attr_name] = attr
		self.funcs = funcs
		self.register_introspection_functions()
开发者ID:robintptsai,项目名称:ms101robin,代码行数:13,代码来源:xmlrpc.py


注:本文中的SimpleXMLRPCServer.SimpleXMLRPCDispatcher.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。