gcc -fPIC -c -I/usr/include/python2.7 -I/usr/lib/python2.7/config factorial.c wrapper.c
gcc -shared factorial.o wrapper.o -o factorial.so
Modul in Python importieren:
>>> import factorial
>>> factorial.fact(10)
3628800
>>> factorial.fact(6)
720
>>>
Falls ein Modul
example benannt
wird, dann heißt die
zugehörige so-Datei
example.so oder
examplemodule.so!