Python documentation gives a nice introduction to Extending and Embedding Python with C\C++. However, in many cases there's a need to transfer com开发者_运维知识库plex 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.
IIRC Boost.Python http://www.boost.org/doc/libs/1_54_0/libs/python/doc/index.html will do a lot of the heavy lifting for you here.
精彩评论