7 ms·
Very nice! This seems more convenient than using Cython glue code. But how on Earth had I not heard of pybind11, the magic library that this is built on? It's j
by versteegen 10y ago
Very nice! This seems more convenient than using Cython glue code. But how on Earth had I not heard of pybind11, the magic library that this is built on? It's just what I wanted: boost::python without boost.
- dr_zoidberg 10y agoWhen 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
- barkingdog 10y agoI have the same reaction as you. I am very impressed by this, as well as pybind11. My only worry is the fear that the automagic will break down somewhere, but I hope I am wrong and it will not hurt to try! If it works, it will significantly speed up my integration with an SDK that would have required enough extra hours to have otherwise not been worth it. Very exciting.