How to embed Python3 with the standard library

前端 未结 3 1022
花落未央
花落未央 2021-02-07 17:10

I am attempting to embed Python in an (ultimately multiplatform) C++ app.

It\'s important that my app contains its own Python implementation (in the same way that blend

3条回答
  •  失恋的感觉
    2021-02-07 17:50

    You are looking for Boost.Python!

    It's a C++ library which enables seamless interoperability between C++ and the Python programming language and in my opinion this should suffice your need, unless you are trying to achieve something else.

    It also has a mechanism for embedding the python interpreter into C++ code and one can refer to this link (URL isn't release specific) to delve into the possibilities.

    P.S. I believe less in reinventing the wheel and more into the re-usability.

提交回复
热议问题