Protected constructor: can be instantiated only from children
Utility class for running Python commands from various parts of QGIS. There is no direct Python support in the core library, so it is expected that application with Python support creates a subclass that implements pure virtual function(s) during the initialization. The static methods will then work as expected.
Added in QGIS v?
eval(command: str) → Tuple[bool, str]¶
Eval a Python statement
evalCommand(self, command: str, result: str) → bool¶
isValid() → bool¶
Returns true if the runner has an instance (and thus is able to run commands) *
run(command: str, messageOnError: str = '') → bool¶
Execute a Python statement
runCommand(self, command: str, messageOnError: str = '') → bool¶
Assign an instance of Python runner so that run() can be used. This method should be called during app initialization. Takes ownership of the object, deletes previous instance. *