I want to build a Python module that use C++ because it is much faster. I found out that I can use subprocess
module to run an executable file however I can't build a package. I also tried ctypes
but I can't return object like std::vector
in C++. So what is the most efficient way to build a package with wrapped C++ code? Thanks in advance!
You should build a C/C++ Python extension module. See:
Pybind11 is the easiest way to build a C/C++ extension for Python.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.