py3: ported module init to python3

This commit is contained in:
wmayer
2016-01-23 15:30:29 +01:00
parent 915a1b18c4
commit 76b3397762
11 changed files with 92 additions and 37 deletions

View File

@@ -37,14 +37,14 @@ extern PyObject* initModule();
/* Python entry */
PyMODINIT_FUNC initImageGui()
PyMOD_INIT_FUNC(ImageGui)
{
if (!Gui::Application::Instance) {
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
return;
PyMOD_Return(0);
}
(void) ImageGui::initModule();
PyObject* mod = ImageGui::initModule();
Base::Console().Log("Loading GUI of Image module... done\n");
// instantiating the commands
@@ -55,4 +55,6 @@ PyMODINIT_FUNC initImageGui()
// add resources and reloads the translators
loadImageResource();
PyMOD_Return(mod);
}