Skip to content

Commit

Permalink
py3: ported Draft to python3
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Feb 4, 2017
1 parent 81464b5 commit 8696ecd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Mod/Draft/App/AppDraftUtils.cpp
Expand Up @@ -27,23 +27,25 @@
#endif

#include <Base/Console.h>
#include <Base/PyObjectBase.h>
#include <Base/Interpreter.h>

namespace DraftUtils {
extern PyObject* initModule();
}

/* Python entry */
PyMODINIT_FUNC initDraftUtils()
PyMOD_INIT_FUNC(DraftUtils)
{
// load dependent module
try {
Base::Interpreter().loadModule("Part");
}
catch(const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
return;
PyMOD_Return(0);
}
(void)DraftUtils::initModule();
PyObject* mod = DraftUtils::initModule();
Base::Console().Log("Loading DraftUtils module... done\n");
PyMOD_Return(mod);
}

0 comments on commit 8696ecd

Please sign in to comment.