lundi 27 août 2018

How do you access name of a ProtoField after declaration?

How can I access the name property of a ProtoField after I declare it?

For example, something along the lines of:

myproto = Proto("myproto", "My Proto")

myproto.fields.foo = ProtoField.int8("myproto.foo", "Foo", base.DEC)

print(myproto.fields.foo.name)

Where I get the output:

Foo





Aucun commentaire:

Enregistrer un commentaire