①創建一個有一些函數的C語言文件
cfun.c
int product(int a, int b) { return a * b; }②編譯它並創建共享的庫文件
gcc -o hxxlib.so --shared -fPIC cfun.c
③在python文件中使用生成的共享庫文件
from ctypes import * c_file = 'hxxlib.so' c_fun = CDLL(c_file) a = 2 b = 5 print(c_fun.product(a,b))
Python data visualization Seaborn (II) -- Distributed Data Visualization
This article is Python visuali
About Python using face on MAC_ Recognize error oserror: dlopen (libc.so.6, 6): image not found
Find and edit the file venv/li