Python 调用C函数

/********************************************************************
 *                       Python 调用C函数
 * 说明:
 *     Tony在处理SQL Server数据库中遇到需要用C来处理数据,看一下Python
 * 调用C函数相关东西。
 *
 *                                 2017-6-3 深圳 龙华樟坑村 曾剑锋
 *******************************************************************/

一、参考文档:
    1. 浅谈 Python 程序和 C 程序的整合
        https://www.ibm.com/developerworks/cn/linux/l-cn-pythonandc/
    2. PYTHON调用C语言函数
        http://coolshell.cn/articles/671.html
    3. Python调用C函数的方法以及如何编写Python的C扩展
        http://www.jianshu.com/p/cd28e8b0cce1
    4. 用C语言扩展Python的功能
        https://www.ibm.com/developerworks/cn/linux/l-pythc/
    5. 简单的C扩展模块
        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-sample

二、ctypes访问C代码:
    http://python3-cookbook.readthedocs.io/zh_CN/latest/c15/p01_access_ccode_using_ctypes.html#

三、模块访问C代码:
    https://github.com/wusuopu/python-c-extension-sample

 

posted on 2017-06-03 14:23  zengjf  阅读(303)  评论(0编辑  收藏  举报

导航