web_server_service.py 文件源码

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

项目:shakecast 作者: usgs 项目源码 文件源码
def SvcStop(self):
        self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
        win32event.SetEvent(self.stop_event)
        self.stop_requested = True

        # Send the http request to shutdown the server
        try:
            urllib2.urlopen('http://localhost:80/shutdown')
        except Exception:
            urllib2.urlopen('http://localhost:5000/shutdown')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号