python - Import external file using Cython -


i downloaded pyx , c file internet , wondering how can incorporate python? documentation on cython vague , focus on generating pyx/c py file. great if give me solid examples on how properly. many thanks

the cython executable turns .pyx file .c file. use favorite c build tool compile shared library (e.g. .so file on linux). poof, have extension module. note you'll need figure out arguments c compiler header paths python , numpy. these depend heavily on not os particulars of how you've installed python , scipy on it.

if sounds bit scary, see if .pyx file simple enough can use pyximport handle messy compilation you. if external libraries needed, you'll need construct .pyxbld file.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -