#ifdef USE_PYTHON
#include "py/python.hpp"
+extern "C" void initmussa();
+extern "C" void initmussaqui();
#endif
#include "qui/MussaWindow.hpp"
// allow the user to keep the interpreter open even after
// closing all the windows
app.setQuitOnLastWindowClosed(false);
- const InterpreterThread *interp = thread.create_interpreter();
+ InterpreterThread *interp = thread.create_interpreter();
+ if (!interp) {
+ std::cerr << "Unable to initialize interpeter thread" << std::endl;
+ return 1;
+ }
+ MussaPython *py = interp->get_py();
+ if (!py) {
+ std::cerr << "Unable to initialize python interpreter" << std::endl;
+ return 1;
+ }
+ py->add_module("mussa", &initmussa);
+ py->add_module("mussaqui", &initmussaqui);
// quit when the interpreter exits
QObject::connect(interp, SIGNAL(finished()),
&app, SLOT(quit()));
+ interp->start();
app.exec();
} else
#endif /* USE_PYTHON */