socketserverservice.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:execnet 作者: pytest-dev 项目源码 文件源码
def __init__(self, args):
        # The exe-file has messages for the Event Log Viewer.
        # Register the exe-file as event source.
        #
        # Probably it would be better if this is done at installation time,
        # so that it also could be removed if the service is uninstalled.
        # Unfortunately it cannot be done in the 'if __name__ == "__main__"'
        # block below, because the 'frozen' exe-file does not run this code.
        #
        win32evtlogutil.AddSourceToRegistry(self._svc_display_name_,
                                            servicemanager.__file__,
                                            "Application")
        win32serviceutil.ServiceFramework.__init__(self, args)
        self.hWaitStop = win32event.CreateEvent(None, 0, 0, None)
        self.WAIT_TIME = 1000  # in milliseconds
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号