Learning-Ctypes-module:在Python中使用C代码

时间:2021-04-10 16:44:33
【文件属性】:
文件名称:Learning-Ctypes-module:在Python中使用C代码
文件大小:4KB
文件格式:ZIP
更新时间:2021-04-10 16:44:33
Python [1]创建.c文件。 [2]创建共享库。 命令:[gcc -fPIC -shared -o math.so math.c] [3]创建.py文件并导入ctypes。 [4]使用CDLL类并为其提供共享的lib路径。 [5]使用数学对象可以调用函数。
【文件预览】:
Learning-Ctypes-module-main
----README.md(228B)
----math.c(40B)
----LICENSE(1KB)
----math.so(15KB)
----main.py(76B)

网友评论