Browsing the blog archivesfor the day Wednesday, April 10th, 2013.

Using Python and C Together


If we have an algorithm that goes really hard on the cpu, or we want to make some low level things we can implement the related area with C, and then access it from Python.

The first part of the article will cover how to call a C function from Python with the help of ctypes. In the second part, we will cover  how to run Python code from C side -sea side :P-.

First, we need to prepare out C files. Assume that we have a C function that does some sophisticated things. Related file:

Continue Reading »

Bu yazı toplamda 2468, bugün ise 1 kez görüntülenmiş