1.下载必须的包 https://github.com/Pithikos/python-websocket-server,解压缩并把文件夹名‘python-websocket-server-master’ 改为‘websocket’ 2.websocket文件夹内只保留websocket_server文件夹和server.py 3.稍微修改server.py的源码 from websocket_server import WebsocketServer # Called for every cl…