pip install socket
pip install websocket
pip install websocket-client
socket
import socketAddress = ('127.0.0.1', 3000) # Socket server address, modify according to your own situations = socket.socket(socket.AF_INET, socket.SOCK_STREAM)s.connect(Address) # try to connect to the servermsg="test"s.sendall(msg.encode())websocket
from websocket import create_connectionimport jsonurl = 'ws://127.0.0.1:3000'data = '{}'ws = create_connection(url)msg=["Send",{"content":"test"},1]ws.send(json.dumps(msg))
Rewrite get method and source code analysis using djangorestframework serializer
Rewrite the query interface C
Ubuntu installation of python3.7 and the solution to the failure of soft link switching between python3 and PIP3
The terminal input has been so