python接收TCP协议的Json格式消息,并保存.txt
#!/usr/bin/env python# -*- coding: utf-8 -*-import timeimport jsonimport socketimport time,datetimeimport osHOST='192.168.0.120'PORT=8850BUFFER=9600#定义socket通信类型 ipv4,tcpsoc=socket.socke...