py3: ported Path to python3
This commit is contained in:
@@ -51,11 +51,11 @@ extern PyObject* initModule();
|
||||
}
|
||||
|
||||
/* Python entry */
|
||||
PyMODINIT_FUNC initPathGui()
|
||||
PyMOD_INIT_FUNC(PathGui)
|
||||
{
|
||||
if (!Gui::Application::Instance) {
|
||||
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
|
||||
return;
|
||||
PyMOD_Return(0);
|
||||
}
|
||||
try {
|
||||
Base::Interpreter().runString("import PartGui");
|
||||
@@ -63,9 +63,9 @@ PyMODINIT_FUNC initPathGui()
|
||||
}
|
||||
catch(const Base::Exception& e) {
|
||||
PyErr_SetString(PyExc_ImportError, e.what());
|
||||
return;
|
||||
PyMOD_Return(0);
|
||||
}
|
||||
(void)PathGui::initModule();
|
||||
PyObject* mod = PathGui::initModule();
|
||||
Base::Console().Log("Loading GUI of Path module... done\n");
|
||||
|
||||
// instantiating the commands
|
||||
@@ -83,4 +83,6 @@ PyMODINIT_FUNC initPathGui()
|
||||
|
||||
// register preferences pages
|
||||
new Gui::PrefPageProducer<PathGui::DlgSettingsPathColor> ("Path");
|
||||
|
||||
PyMOD_Return(mod);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user