备注:这里是我为培训写的PPT,网上资料较少,特此分享出来。
What is python extension?
The extension of python is that provided by other computer language such as C/C++.
Creating extensions for python involves three main steps:
1. Creating application code
2. Wrapping code with boilerplates
3. Compilation and testing
1. Creating application code
To call c function in python, we need program codes inherit corresponding wrap’s interface,and then Complier them as a python’s module.
2. Wrapping code with boilerplates
1). Include Python header file