SWIG Python Structure Array
I've been searching for a few days trying to figure out how to turn an array of structures into a Python list. I have a function that returns a pointer to the beginning of the array. struct foo { int member; }; struct foo *bar() { struct foo *t = malloc(sizeof(struct foo) * 4); ... do stuff with the structs ... return t; } After calling the function from Python I get a single structure but trying to access the other elements of the array causes an error: foo = bar() print foo[1].member TypeError: 'foo' object does not support indexing I've tried using %array_class but to no avail. I've also