MCPcopy Create free account
hub / github.com/MrKepzie/Natron / launchPythonInterpreter

Method launchPythonInterpreter

Engine/AppManager.cpp:3429–3449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3427}
3428
3429void
3430AppManager::launchPythonInterpreter()
3431{
3432 std::string err;
3433 std::string s = "app = app1\n";
3434 bool ok = NATRON_PYTHON_NAMESPACE::interpretPythonScript(s, &err, 0);
3435
3436 assert(ok);
3437 if (!ok) {
3438 throw std::runtime_error("AppInstance::launchPythonInterpreter(): interpretPythonScript(" + s + " failed!");
3439 }
3440
3441 // PythonGILLocker pgl;
3442#if PY_MAJOR_VERSION >= 3
3443 // Python 3
3444 Py_Main(1, &_imp->commandLineArgsWide[0]);
3445#else
3446 Py_Main(1, &_imp->commandLineArgsUtf8[0]);
3447#endif
3448
3449}
3450
3451int
3452AppManager::isProjectAlreadyOpened(const std::string& projectFilePath) const

Callers 1

loadInternalMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected