Class sh::scripting::PythonScriptInterpreter

class sh::scripting::PythonScriptInterpreter : public sh::scripting::ScriptInterpreter, public sh::base::Singleton

Integration of the Python language for scripting.

Find also the scripting manual for all details about the scripting interface.

Public Functions

~PythonScriptInterpreter()
bool isAvailable()
void initializeInterpreter()
QString filesuffix()
void execute(QString script)
void doInitialize()

Executes singleton initialization.

void shutdown()

Shutdown down this singleton.

bool isAlive()

Returns if this singleton is alive (true until its shutdown begins).

Public Members

PyObject *_Exception
PyObject *_CancelException
PyObject *_ThreadAbortException

Public Static Functions

void registerMethod(sh::scripting::ApiClass *clss, QString name, PyCFunction fctptr)
void throwNativeExceptionFromPythonTraceback()

Public Static Attributes

QHash<void*, PyObject*> _buddies
QHash<void*, std::weak_ptr<void>> _natives

Private Functions

PythonScriptInterpreter()

Private Static Functions

PyObject *getApiModuleDef()

Private Static Attributes

void *apiModuleDef
sh::scripting::Api *api = new sh::scripting::Api()
QHash<QString, PyCFunction> _methods
PyObject *modtraceback