Oops, I over-complicated that. Try this: struct { u8 code[5]; u8 unused[11]; } pttid[15];
Now instead of calling pttid.code0, call pttid[0].code. Or: for pttid in self._memobj.pttid: _code = pttid.code ... # create setting, etc