085-wsreqhandlers.py
来自「this code is used for edit on os of s60」· Python 代码 · 共 23 行
PY
23 行
def init_server(): global phone_req, cache phone_req = {} cache = {}def process_json(msg): global cache cache = msg return phone_reqdef process_get(path, query): phone_req[path] = True if path in cache: return cache[path] return "text/plain",\ "Your request is being processed."\ "Reload the page after a while."init_server()httpd = Server(('', 9000), Handler)httpd.serve_forever()
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?