last-before-sharing
This commit is contained in:
17
pb/messages.py
Normal file
17
pb/messages.py
Normal file
@ -0,0 +1,17 @@
|
||||
from socket import MsgFlag
|
||||
import protoparser
|
||||
import json
|
||||
|
||||
def parseMessage(pb, parent):
|
||||
if hasattr(pb, 'messages'):
|
||||
for msg in pb.messages:
|
||||
print(pb.messages)
|
||||
|
||||
|
||||
|
||||
pb = protoparser.parse_from_file("pb/messages.proto")
|
||||
#print(json.dumps(pb))
|
||||
print(json.dumps(pb.messages))
|
||||
|
||||
with open('messages.json', 'w') as f:
|
||||
f.write(pb)
|
Reference in New Issue
Block a user