.
, C . Python:
os.system("myccode -v args etc")
, - , . , .
Each language has its own mechanism for calling C in a single process. Python, for example, has a C API, and you can create your C code in a Python extension. This allows a very tight integration, but it works better both when learning the C API and carefully writing code so that there is no memory leak.
Python also provides ctypes , which can call the C DLL. This is slightly simpler than the full C extension, but does not provide all the integration options.
source
share