Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python call c function

Instructions :
1/Creat a C file (.c extension) with the required functions
2/Create a shared library file (.so extension) using the C compiler.
3/In the Python program, create a ctypes.CDLL instance from the shared file.
4/Finally, call the C function using the format {CDLL_instance}.{function_name}({function_parameters}).
 
PREVIOUS NEXT
Tagged: #python #call #function
ADD COMMENT
Topic
Name
7+9 =