Yep
compile it into a C++ library. It shouldn't matter where you run it.
C++ Library? I actually need a python extension
ohh, i didn't read that. That's fine
A python native extension is basically a dll
But he said about library for c++ i think
Ohh sorry misread.
There's two ways of extending python with C: 1) compile to a C++ lib, .dll/.so and import it directly in python using ctypes, then you wrap the functionality in python. 2) build your module in C/C++, use distutils to create a module. << you are using this aren't you?
but the dll interface needs to be C. Aka extern "C"
ah yeah. True that
there are cython and https://pypi.org/project/cffi/ too
Note: don't confuse Cython with CPython, they are totally different things
ohh i didn't know about cffi. Thanks
i realise that, but thanks
Обсуждают сегодня