Ask Your Question
0

How do you access name of a ProtoField after declaration?

asked 2018-08-27 17:22:06 +0000

charlesw gravatar image

updated 2018-08-27 17:22:21 +0000

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
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-09-04 14:09:51 +0000

cmaynard gravatar image

For reference, this question has been answered over at stackoverflow: https://stackoverflow.com/questions/5...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-08-27 17:22:06 +0000

Seen: 798 times

Last updated: Sep 04 '18