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


Python HTTPServer.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from BaseHTTPServer import HTTPServer [as 别名]
# 或者: from BaseHTTPServer.HTTPServer import __init__ [as 别名]
def __init__(
        self,
        host,
        port,
        app,
        processes=40,
        handler=None,
        passthrough_errors=False,
        ssl_context=None,
        fd=None,
    ):
        if not can_fork:
            raise ValueError("Your platform does not support forking.")
        BaseWSGIServer.__init__(
            self, host, port, app, handler, passthrough_errors, ssl_context, fd
        )
        self.max_children = processes 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:19,代码来源:serving.py

示例2: __init__

# 需要导入模块: from BaseHTTPServer import HTTPServer [as 别名]
# 或者: from BaseHTTPServer.HTTPServer import __init__ [as 别名]
def __init__(self,parent=None):
        ULObject.__init__(self,parent)
        self.createAttribute("angle",float)
        self.createAttribute("direction",int)
        self.createAttribute("function",int)
        self.createAttribute("length",int)
        self.createAttribute("name",str)
        self.createAttribute("net",str)
        self.createAttribute("route",int)
        self.createAttribute("swaplevel",int)
        self.createAttribute("visible",int)
        self.createAttribute("x",int)
        self.createAttribute("y",int)
        self.createAttribute("circles",[ULCircle])
        self.createAttribute("contacts",[ULContact])
        self.createAttribute("texts",[ULText])
        self.createAttribute("wires",[ULWire]) 
开发者ID:rmawatson,项目名称:PyEagle,代码行数:19,代码来源:Eaglepy.py

示例3: __init__

# 需要导入模块: from BaseHTTPServer import HTTPServer [as 别名]
# 或者: from BaseHTTPServer.HTTPServer import __init__ [as 别名]
def __init__(self, server_address, RequestHandlerClass,
                     ssl_context=None, request_queue_size=None):
            # This overrides the implementation of __init__ in python's
            # SocketServer.TCPServer (which BaseHTTPServer.HTTPServer
            # does not override, thankfully).
            HTTPServer.__init__(self, server_address, RequestHandlerClass)
            self.socket = socket.socket(self.address_family,
                                        self.socket_type)
            self.ssl_context = ssl_context
            if ssl_context:
                class TSafeConnection(tsafe.Connection):
                    def settimeout(self, *args):
                        self._lock.acquire()
                        try:
                            return self._ssl_conn.settimeout(*args)
                        finally:
                            self._lock.release()
                self.socket = TSafeConnection(ssl_context, self.socket)
            self.server_bind()
            if request_queue_size:
                self.socket.listen(request_queue_size)
            self.server_activate() 
开发者ID:linuxscout,项目名称:mishkal,代码行数:24,代码来源:httpserver.py

示例4: __init__

# 需要导入模块: from BaseHTTPServer import HTTPServer [as 别名]
# 或者: from BaseHTTPServer.HTTPServer import __init__ [as 别名]
def __init__(self, protocol):
        self._protocol = protocol
        self._certfile = None
        self._keyfile = None
        self._password = None 
开发者ID:jpush,项目名称:jbox,代码行数:7,代码来源:serving.py


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