/******************************************************************** * Python calls C function * Description: * T Ony encountered the need to use C to process the data in the processing of the SQL Server database, see Python * call C function related things. * * 2017-6-3 Shenzhen Longhua gen Zengjianfeng **************************************************************** ***/First, reference documents:1. Talking about the integration of Python programs and C programs https://www.ibm.com/developerworks/cn/linux/l-cn-pythonandc/ 2. Python calls the C-language function http://coolshell.cn/articles/671.html 3. Python calls the C function's method and how to write Python's C extension http://Www.jianshu.com/p/cd28e8b0cce1 4. Extend the functionality of Python with the C language https://www.ibm.com/developerworks/cn/linux/l-pythc/ 5. Simple C Extension Module http://python3-cookbook.readthedocs.io/zh_cn/latest/c15/p02_write_simple_c_extension_module.html 6. python-c-extension-Sample https://Github.com/zengjfos/python-c-extension-sampleSecond, ctypes Access C code: http://python3-cookbook.readthedocs.io/zh_cn/latest/c15/p01_access_ccode_using_ctypes.html#third, module access C code: https://Github.com/wusuopu/python-c-extension-sample
Python calls the C function