37 QgsDebugMsg( QStringLiteral(
"Unable to run Python command: runner not available!" ) );
50 QgsDebugMsg( QStringLiteral(
"Unable to run Python command: runner not available!" ) );
Utility class for running Python commands from various parts of QGIS.
static bool run(const QString &command, const QString &messageOnError=QString())
Execute a Python statement.
virtual bool evalCommand(QString command, QString &result)=0
static void setInstance(QgsPythonRunner *runner)
Assign an instance of Python runner so that run() can be used.
static bool eval(const QString &command, QString &result)
Eval a Python statement.
virtual bool runCommand(QString command, QString messageOnError=QString())=0
static QgsPythonRunner * sInstance
static bool isValid()
Returns true if the runner has an instance (and thus is able to run commands)
#define QgsDebugMsgLevel(str, level)