feat: Added ability to change entry point name

+ Renamed default entry point name
+ Added proper exception handling
+ Added ability to use .pth files
This commit is contained in:
AURUMVORXX
2025-03-25 19:16:21 +03:00
parent a479b5f85d
commit 03dfd1408c
4 changed files with 47 additions and 29 deletions

View File

@@ -6,7 +6,6 @@ namespace py = pybind11;
using namespace pybind11::literals;
extern py::module_ g2o;
extern py::module_ pysys;
void addEventHandler(const char* eventName, SQFUNCTION closure, unsigned int priority = 9999)
{
@@ -40,7 +39,7 @@ void callEvent(const char* eventName, py::dict kwargs)
}
catch (py::error_already_set &e)
{
pysys.attr("stderr").attr("write")(e.what());
py::print(e.what());
}
}