- PyConsole_Console* pyConsole = app->pythonConsole();
- PyConsole_Interp* pyInterp = pyConsole->getInterp();
- PyLockWrapper aLock = pyInterp->GetLockWrapper();
+#ifndef DISABLE_PYCONSOLE
+ PyConsole_Interp* pyInterp = app->getPyInterp();
+ PyLockWrapper aLock; // Acquire GIL