+ ThreadManager &thread = ThreadManagerFactory();
+ // allow the user to keep the interpreter open even after
+ // closing all the windows
+ app.setQuitOnLastWindowClosed(false);
+ InterpreterThread *interp = thread.create_interpreter();
+ if (!interp) {
+ std::cerr << "Unable to initialize interpeter thread" << std::endl;
+ return 1;
+ }
+ MussaPython *py = interp->get_py_ptr();
+ 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();