首页 > 编程语言 >用Python开发输入法后台

用Python开发输入法后台

时间:2023-05-17 11:00:42浏览次数:54  
标签:INFO 输入法 Python seqNum py PIME 2023 后台 line

首先,安装PIME,github地址: https://github.com/EasyIME/PIME

下载安装PIME-1.3.0-stable-setup.exe,就可以得到一个输入法,后端是python,在安装目录下‘C:\Program Files (x86)\PIME\’,python目录就是运行脚本。 入口点是'server.py',其中安装目录下的‘PIMELauncher.exe’是负责前后台通信的,如果想修改脚本重新加载,可终止此进程再重新使用即可。 前后台通信是纯文本消息,下面是我记录的一部分交互消息:

 改写server.py文件,就可实现后台逻辑了。

# 当切换到当前的输入法时: init, onActivate 2023-04-15 13:00:21,933 - server.py[line:73] - INFO: cf06fbc0-5d7c-4dba-84d2-cb8c410039d9|{"id":"{9c2d6c68-9ea6-4cfb-a769-7e619db7f267}","isConsole":false,"isMetroApp":false,"isUiLess":false,"isWindows8Above":true,"method":"init","seqNum":0} 2023-04-15 13:00:21,933 - server.py[line:92] - INFO: PIME_MSG|cf06fbc0-5d7c-4dba-84d2-cb8c410039d9|{"seqNum": 0, "success": true} 2023-04-15 13:00:21,933 - server.py[line:73] - INFO: cf06fbc0-5d7c-4dba-84d2-cb8c410039d9|{"isKeyboardOpen":true,"method":"onActivate","seqNum":1} 2023-04-15 13:00:22,005 - server.py[line:92] - INFO: PIME_MSG|cf06fbc0-5d7c-4dba-84d2-cb8c410039d9|{"customizeUI": {"candFontSize": 12, "candFontName": "Microsoft YaHei", "candPerRow": 1, "candUseCursor": true}, "addButton": [{"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\eng_full_capson.ico", "tooltip": "�������ГQ", "commandId": 1, "id": "windows-mode-icon"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\eng.ico", "text": "�������ГQ", "tooltip": "�������ГQ", "commandId": 2, "id": "switch-lang"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\full.ico", "text": "ȫ����ГQ", "tooltip": "ȫ��/����ГQ", "commandId": 3, "id": "switch-shape"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\config.ico", "text": "�O��", "tooltip": "�O��", "type": "menu", "id": "settings"}], "changeButton": [{"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\chi_half_capsoff.ico", "id": "windows-mode-icon"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\chi.ico", "id": "switch-lang"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\half.ico", "id": "switch-shape"}], "success": true, "seqNum": 1} # 当切换到别的输入法时: onDeactivate, close 2023-04-15 13:00:23,087 - server.py[line:73] - INFO: cf06fbc0-5d7c-4dba-84d2-cb8c410039d9|{"method":"onDeactivate","seqNum":6} 2023-04-15 13:00:23,087 - server.py[line:92] - INFO: PIME_MSG|cf06fbc0-5d7c-4dba-84d2-cb8c410039d9|{"showCandidates": false, "compositionString": "", "compositionCursor": 0, "removeButton": ["switch-lang", "switch-shape", "settings", "windows-mode-icon"], "success": true, "seqNum": 6} 2023-04-15 13:00:23,087 - server.py[line:73] - INFO: cf06fbc0-5d7c-4dba-84d2-cb8c410039d9|{"method":"close"} # 用户输入w, filterKeyDown,onKeyDown,filterKeyDown(一个w产生3个消息) 2023-04-12 13:29:23,363 - server2.py[line:80] - INFO: 576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"charCode":119,"isExtended":false,"keyCode":87,"keyStates":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,129,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0],"method":"filterKeyDown","repeatCount":1,"scanCode":0,"seqNum":12} 2023-04-12 13:29:23,363 - server2.py[line:95] - INFO: PIME_MSG|576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"return": true, "success": true, "seqNum": 12} 2023-04-12 13:29:23,365 - server2.py[line:80] - INFO: 576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"charCode":119,"isExtended":false,"keyCode":87,"keyStates":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,129,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0],"method":"onKeyDown","repeatCount":1,"scanCode":0,"seqNum":13} 2023-04-12 13:29:23,365 - server2.py[line:95] - INFO: PIME_MSG|576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"changeButton": [{"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\chi_half_capsoff.ico", "id": "windows-mode-icon"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\chi.ico", "id": "switch-lang"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\half.ico", "id": "switch-shape"}], "setSelKeys": "12345", "compositionString": "w", "compositionCursor": 1, "candidateList": ["我", "爲", "玩", "問", "無"], "candidateCursor": 0, "showCandidates": true, "return": true, "success": true, "seqNum": 13} 2023-04-12 13:29:23,370 - server2.py[line:80] - INFO: 576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"charCode":119,"isExtended":false,"keyCode":87,"keyStates":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0],"method":"filterKeyUp","repeatCount":1,"scanCode":0,"seqNum":14} 2023-04-12 13:29:23,370 - server2.py[line:95] - INFO: PIME_MSG|576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"return": 0, "success": true, "seqNum": 14} # 用户输入w之后, 再输入空格, 选择默认第一个候选词: filterKeyDown, onKeyDown, onCompositionTerminated, filterKeyUp 2023-04-12 13:29:25,274 - server2.py[line:80] - INFO: 576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"charCode":32,"isExtended":false,"keyCode":32,"keyStates":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,129,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0],"method":"filterKeyDown","repeatCount":1,"scanCode":0,"seqNum":15} 2023-04-12 13:29:25,274 - server2.py[line:95] - INFO: PIME_MSG|576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"return": true, "success": true, "seqNum": 15} 2023-04-12 13:29:25,274 - server2.py[line:80] - INFO: 576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"charCode":32,"isExtended":false,"keyCode":32,"keyStates":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,129,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0],"method":"onKeyDown","repeatCount":1,"scanCode":0,"seqNum":16} 2023-04-12 13:29:25,274 - server2.py[line:95] - INFO: PIME_MSG|576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"changeButton": [{"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\chi_half_capsoff.ico", "id": "windows-mode-icon"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\chi.ico", "id": "switch-lang"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\half.ico", "id": "switch-shape"}], "commitString": "我", "showCandidates": false, "compositionString": "", "compositionCursor": 0, "return": true, "success": true, "seqNum": 16} 2023-04-12 13:29:25,274 - server2.py[line:80] - INFO: 576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"forced":false,"method":"onCompositionTerminated","seqNum":17} 2023-04-12 13:29:25,274 - server2.py[line:95] - INFO: PIME_MSG|576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"success": true, "seqNum": 17} 2023-04-12 13:29:25,372 - server2.py[line:80] - INFO: 576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"charCode":32,"isExtended":false,"keyCode":32,"keyStates":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0],"method":"filterKeyUp","repeatCount":1,"scanCode":0,"seqNum":18} 2023-04-12 13:29:25,372 - server2.py[line:95] - INFO: PIME_MSG|576d3bee-73dd-4ca5-bae3-940268c9c9e1|{"return": 0, "success": true, "seqNum": 18} # 用户输入'ks', 下面是输入s时的回复 2023-04-16 16:10:58,358 - server.py[line:73] - INFO: 04b6150d-0e0d-45dc-9947-d954c2c6df0a|{"charCode":115,"isExtended":false,"keyCode":83,"keyStates":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,129,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0],"method":"onKeyDown","repeatCount":1,"scanCode":0,"seqNum":8} 2023-04-16 16:10:58,358 - server.py[line:92] - INFO: PIME_MSG|04b6150d-0e0d-45dc-9947-d954c2c6df0a|{"changeButton": [{"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\chi_half_capsoff.ico", "id": "windows-mode-icon"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\chi.ico", "id": "switch-lang"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\half.ico", "id": "switch-shape"}], "compositionString": "k s", "compositionCursor": 3, "candidateList": ["開始", "可是", "考試", "快速", "考生"], "candidateCursor": 0, "showCandidates": true, "return": true, "success": true, "seqNum": 8} # 在输入状态, 比如用户输入'w', 按esc键的处理过程: filterKeyDown, onKeyDown, onCompositionTerminated, filterKeyUp 2023-05-15 12:00:03,213 - server.py[line:73] - INFO: 5e471d15-5c3b-4a71-aa12-1ce25fc0d162|{"charCode":27,"isExtended":false,"keyCode":27,"keyStates":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,129,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0],"method":"filterKeyDown","repeatCount":1,"scanCode":0,"seqNum":7} 2023-05-15 12:00:03,213 - server.py[line:92] - INFO: PIME_MSG|5e471d15-5c3b-4a71-aa12-1ce25fc0d162|{"return": true, "success": true, "seqNum": 7} 2023-05-15 12:00:03,213 - server.py[line:73] - INFO: 5e471d15-5c3b-4a71-aa12-1ce25fc0d162|{"charCode":27,"isExtended":false,"keyCode":27,"keyStates":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,129,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0],"method":"onKeyDown","repeatCount":1,"scanCode":0,"seqNum":8} 2023-05-15 12:00:03,213 - server.py[line:92] - INFO: PIME_MSG|5e471d15-5c3b-4a71-aa12-1ce25fc0d162|{"changeButton": [{"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\chi_half_capsoff.ico", "id": "windows-mode-icon"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\chi.ico", "id": "switch-lang"}, {"icon": "C:\\Program Files (x86)\\PIME\\python\\input_methods\\rime\\icons\\half.ico", "id": "switch-shape"}], "showCandidates": false, "compositionString": "", "compositionCursor": 0, "return": true, "success": true, "seqNum": 8} 2023-05-15 12:00:03,220 - server.py[line:73] - INFO: 5e471d15-5c3b-4a71-aa12-1ce25fc0d162|{"forced":false,"method":"onCompositionTerminated","seqNum":9} 2023-05-15 12:00:03,220 - server.py[line:92] - INFO: PIME_MSG|5e471d15-5c3b-4a71-aa12-1ce25fc0d162|{"success": true, "seqNum": 9} 2023-05-15 12:00:03,321 - server.py[line:73] - INFO: 5e471d15-5c3b-4a71-aa12-1ce25fc0d162|{"charCode":27,"isExtended":false,"keyCode":27,"keyStates":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0],"method":"filterKeyUp","repeatCount":1,"scanCode":0,"seqNum":10} 2023-05-15 12:00:03,321 - server.py[line:92] - INFO: PIME_MSG|5e471d15-5c3b-4a71-aa12-1ce25fc0d162|{"return": 0, "success": true, "seqNum": 10}

标签:INFO,输入法,Python,seqNum,py,PIME,2023,后台,line
From: https://www.cnblogs.com/huzhongqiang/p/17407912.html

相关文章

  • python 项目报错 Fatal Python error: _enter_buffered_busy: could not acquire lock
    FatalPythonerror:_enter_buffered_busy:couldnotacquirelockfor<_io.BufferedWritername=''>atinterpretershutdown,possiblyduetodaemonthreadsPythonruntimestate:finalizing(tstate=0x00005654c4008a40)Currentthread0x00007fc......
  • Python学习
    3-13字符串类型字符串类型:str   1.定义格式:       变量='内容'           打印一行       变量="内容"           打印一行       变量='''内容'''或者三引号           可以通过回车的方式换行,且打印出......
  • python环境搭建,使用conda工具
    开发环境搭建安装miniConda:conda和miniConda和Anaconda的区别安装pycharm:pycharm创建项目并使用base环境作为开发环境pycharm的interpreter是什么安装jupyter:jupyter的快捷键conda的虚拟环境命令:condacreatecondaact......
  • 基于”python+requests模块“接口自动化的基本方法使用
    1,接口自动化测试1.1概念接口测试:是对系统或者组件之间的接口进行测试,主要是校验数据的交换,传递和控制管理过程,以及相互逻辑依赖关系。接口自动化测试:让程序代替人为对接口项目进行自动验证测试的过程1.2实现方式1,工具(jmeter,postman)2,代码(python-requests)1.3测试工具缺点......
  • python中提供正则支持的re模块
    1re模块的作用个人觉得就是按照给定的条件,在文本中去寻找匹配对应的字符re模块十分强大,提供的正则规则也非常多,网上有很多辅助和测试工具,现在有ai就更加方便了,不过一些基础的使用最好还是了解下2正则表达式个人理解,正则表达式就是寻找、匹配的规则或者条件,它是一个字符串的......
  • Python学习之十三_pip的学习
    Python学习之十三_pip的学习pip的含义pip:pipisthepackageinstallerforPython.YoucanusepiptoinstallpackagesfromthePythonPackageIndexandotherindexes.pip其实就是python的包管理器:PackagesInstallforPython他可以在线安装也可以离线安装......
  • Python: 结合多进程和 Asyncio 以提高性能
    动动发财的小手,点个赞吧!简介多亏了GIL,使用多个线程来执行CPU密集型任务从来都不是一种选择。随着多核CPU的普及,Python提供了一种多处理解决方案来执行CPU密集型任务。但是直到现在,直接使用多进程相关的API还是存在一些问题。在本文开始之前,我们还有一小段代码来帮助演......
  • Fast-GRPC: 用python轻松开发grpc接口
    简介Fast-GRPC旨在帮助开发者更加轻松快捷地使用Python开发gRPC接口。它的特点包括简化步骤、简单上手、快速开发,同时支持异步和同步代码,以及支持Middleware,灵感来自FastAPI。安装需要python3.7+pipinstallpython-fast-grpc快速上手下面是一个简单的Fast-GRPC示......
  • python字符串的45个内置方法
    1.字符串拼接和查找: 2.字符串分割替换和大小写操作: 3.字符串判断内容: 4.字符串剩下操作: ......
  • python学生管理系统笔记(+增删改查,但不存入数据库或文件中)
    原本的基础上+增删改查,但不存入数据库或文件中,就是数据只在一次运行的页面中进行增删改查,但是重新运行不会有之前的数据,因为没有更新到json或者数据库中。1.LoginPage.pyimporttkinterastkfromtkinterimportmessageboxfromdbimportdbfromMainPageimportMainPage......