在Python ctypes中加载C标准库的便携方式

min*_*hee 9 python ctypes libc

有没有一种可移植的方法来加载Python ctypes中的C标准库(libc.so,libc.dylib)?我应该只使用if/ elif声明platform.system()函数的结果吗?

Dav*_*nan 1

图书馆ctypes不提供任何此类性质的内容,因此if您需要一份声明。