摘要: 用 C/C++ 扩展 Python。 - 如果仅使用标准 C 库函数,则可以使用 Python 自带的 ctypes 模块,或者使用 cffi。 - 如果要使用自定义 C/C++ 函数,又不怕写 wrapper 麻烦,则可以使用 Python C API。 - 如果专门针对 C++ 模块打包,可以尝 阅读全文
posted @ 2018-03-15 21:08 Anonymous596 阅读(377) 评论(0) 推荐(0)
摘要: Python 编写完扩展包并 build 好后,可以采用 $ sudo ./setup.py install 安装。采用这种方式安装的扩展包,可以使用 pip list 查看到,但不能直接使用 pip uninstall 卸载,pip 会明确提示这种安装包卸载不干净。 一个迂回的方法是: 1) 在 阅读全文
posted @ 2018-03-15 15:12 Anonymous596 阅读(2374) 评论(0) 推荐(0)