Код: Выделить всё
namespace py=pybind11;
PYBIND11_MODULE(test, m)
{
py::class_(m, "test1")
.def("fn", ...)
}
< /code>
и в примере.import test
while True:
try:
test.test1.fn(...)
except ???:
print("exception error.")
Подробнее здесь: https://stackoverflow.com/questions/625 ... a-pybind11
Мобильная версия