MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / loadModule

Method loadModule

src/Base/Interpreter.cpp:489–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489bool InterpreterSingleton::loadModule(const char* psModName)
490{
491 PyObject* module {};
492
493 PyGILStateLocker locker;
494 module = PP_Load_Module(psModName);
495
496 if (!module) {
497 if (PyErr_ExceptionMatches(PyExc_SystemExit)) {
498 throw SystemExitException();
499 }
500
501 throw PyException();
502 }
503
504 return true;
505}
506
507PyObject* InterpreterSingleton::addModule(Py::ExtensionModuleBase* mod)
508{

Callers 15

processFilesMethod · 0.80
processCmdLineFilesMethod · 0.80
PyMOD_INIT_FUNCFunction · 0.80
importModuleMethod · 0.80
setupCustomToolbarsMethod · 0.80
PyMOD_INIT_FUNCFunction · 0.80
PyMOD_INIT_FUNCFunction · 0.80
PyMOD_INIT_FUNCFunction · 0.80
PyMOD_INIT_FUNCFunction · 0.80
PyMOD_INIT_FUNCFunction · 0.80
PyMOD_INIT_FUNCFunction · 0.80
PyMOD_INIT_FUNCFunction · 0.80

Calls 3

PP_Load_ModuleFunction · 0.85
SystemExitExceptionFunction · 0.85
PyExceptionFunction · 0.85

Tested by

no test coverage detected