1. Introduction (compare their characteristics, ask questions) C + + and Python are used in a more extensive language, each has its advantages; C + + performance, Python simple convenience library rich, if you can combine the use of both good. Python is a scripting language that the interpreter translates into executable code. Python is powerful, it provides C + + calls, meaning that C/D + + can embed Python code, in reality you can play the advantages of both languages. 2. How to implement on the implementation, Python provides a C interface for use in C/C + +, to provide include and Lib in the form of a Lib library in the language, and Python.h and python27.lib can be found in the Python installation directory. Python provides three forms of "embedding"------Code strings,callable Objects,code Filescode strings, passed directly to the interpreter as a string, and some return values can be obtained. Callable objects, load a python file first, and then call the function or variable in the file. Code files, loaded directly in the form of a python file. Essentially, these features are provided through Python's set of C interfaces, which can be used for the time being, and then learn when you need them later. 3. What other libraries are PYTHONQT: 2.8 and 3.0 (QT4.8) have not been tested successfully. Boost.python: Not tried. Related: First knowledge python and qt:http://mobile.51cto.com/symbian-268735.htmprogramming python, 3rd edition:http:// Wiki.woodpecker.org.cn/moin/pp3ed/ch-23-2 embed python in the QT program: http://blog.csdn.net/jingwenlai_scut/article/details/ 5642348c++ and Python mixed programming-C + + write Python extension: http://tanklee.github.io/2013/11/25/python-cpp-programming-1/
Some understandings of Python embedding into C + +