It's not entirely clear from your question, but it looks like you're trying to define a struct that contains a pointer to the same type. It's not immediately obvious how you would accomplish this in python, but you basically define your Structure, and then define the _fields_ attribute afterwards.
The ctype docs on python.org have a perfectly on-point example of doing exactly this.
There's also good documentation there on working with structs in general, including nesting one struct type within another, which works a little more obviously.
It's not entirely clear from your question, but it looks like you're trying to define a struct that contains a pointer to the same type. It's not immediately obvious how you would accomplish this in python, but you basically define your
Structure
, and then define the_fields_
attribute afterwards.The ctype docs on python.org have a perfectly on-point example of doing exactly this.
There's also good documentation there on working with structs in general, including nesting one struct type within another, which works a little more obviously.