3 ms·
When I read it, it remind me of Cython's pyximport: >>> import pyximport; pyximport.install() >>> import helloworld Hello World The example is tak
by dr_zoidberg 10y ago
When I read it, it remind me of Cython's pyximport:
>>> import pyximport; pyximport.install()
>>> import helloworld
Hello World
The example is taken from Cython's basic tutorial page[0], in which helloworld.pyx simply has a print "Hello World" statement.
However I don't don't Cython and cppimport are interchangeable, or that using one excludes using the other. cppimport is for bringing C++ code in a seamless way, while Cython makes it easy to optimize Python code converting it to C (which you can further hand optimize if you so need it).
[0] http://docs.cython.org/src/tutorial/cython_tutorial.html http://docs.cython.org/src/tutorial/cython_tutorial.html