Python接收到的数据是个6字节的数,定义self.com_buf =data[3]+data[4];
运行时:TypeError: 'int' object is not iterable

Python接收到的数据是个6字节的数,定义self.com_buf =data[3]+data[4];
运行时:TypeError: 'int' object is not iterable

你的数据读进来之后应该是作为string类型存储的吧
你打印一下你data内部的数据格式,我怀疑是没转化为int导致的
print(tpye(data[0]))这样