Рет қаралды 47,529
Python as a Programming Language is slower and less efficient in comparison to languages like C and C++. Writing certain parts of your code in C/C++ can significantly improve your performance. The ctypes library creates an interface which allows you to import C/C++ functions and execute them in Python.
C File Compilation Command:
gcc -fPIC -shared -o clibrary.so clibrary.c
Website Link: coderslegacy.com/python/ctype...
Related Links:
Ctypes Basics: • Python ctypes Tutorial...
Ctypes Datatypes and Strings: • Python ctypes Library ...
Ctypes Pointers: • Introducing Pointers i...
Ctypes with C++: • Ctypes Library - How t...