Python documentation gives a nice introduction to Extending and Embedding Python with C\C++. However, in many cases there's a need to transfer complex data structures between the languages.
What would be the best way to achieve this?
Create your own type and fill the tp_*attr
members appropriately.