The question is in the title. I try to wrap c++ code to python, which has nested structs (struct definitions inside another struct definition), and the inner struct doesn't appear in my python module (albeit I want it to appear). I consulted the Swig documentation (version 4.3, 6.27 Nested classes), and it says: If the target language doesn't support nested classes directly, or the support is not implemented in the language module (like for Python currently), then the visible nested classes are moved to the same name space as the containing class (nesting hierarchy is "flattened"). To me this reads as if wrapping a nested struct was possible. So am I doing something wrong? If so, what do I need to do differently? Or is this expected behaviour? Does the qualifier "visible" play a role here? If so, what do I have to do to make the inner struct visible? For you to test, I have made a minimal (non)working example: My File: "test-Swig.h" struct TestA { double memberA1; double memberA2; struct TestB { double memberB1; double memberB2; }; }; struct TestC { double memberC1; double memberC2; }; and my interface file looks like so: %module test %{ #include "test-Swig.h" %} %include "test-Swig.h" Continue reading...