Py学习  »  问与答

python 自动获取pb协议里定义的所有字段

loly • 4 年前 • 671 次点击  

python大佬,怎么找到protobuf协议消息里的所有字段。 比如

message Person { requried string name = 1; requried int32 age = 2; required string addr = 3; requried int32 score = 4; }

怎么获取Person结构里的4个字段呢,我的目的是自动找到消息的字段,并赋值

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/55398
 
671 次点击