[Tutor] Python C extension - which method?

Brad M thebigwurst at gmail.com
Fri May 4 05:30:25 EDT 2018

Hi all:

I want to create a C-based memory scanner for Python, and so far this is
how I do it:


from ctypes import cdll
mydll = cdll.LoadLibrary('hello.dll')

and hello.dll:

#include <stdio.h>
__declspec(dllexport) int say_something()
    return 1980;

so the printout is "1980"

Is this alright? I am aware that there is another much more complicated
method such as this:


Is my method alright?


More information about the Tutor mailing list