CFFI documentation¶ C Foreign Function Interface forPython. Interact with almost any C code fromPython, based on C-like declarations that you can often copy-paste from header files or documentation.
「C Foreign Function Interface for Python. Interact with almost any C code from Python, based on C-like declarations that you can often copy-paste from header files or documentation.」これを使うのが正攻法なのかな?
「In general, defining variables in C header file is poor style. The header file should only declare objects, leaving their definition for the appropriate ".c" source code file.」それはわかっているけどenumとか取り込みたい。