Class: QgsCodeInterpreter¶
An interface for code interpreters.
Added in version 3.30.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: execCommandImpl()
, promptForState()
Abstract Methods
Pure virtual method for executing commands in the interpreter. |
|
Returns the interactive prompt string to use for the interpreter, given a state. |
Methods
Executes a command in the interpreter. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsCodeInterpreter. See the FAQ for more details.
Returns the current interpreter state. |
- class qgis.gui.QgsCodeInterpreter[source]¶
Bases:
object
- virtual currentState(self) int [source]¶
Returns the current interpreter state.
The actual interpretation of the returned values depend on the interpreter subclass.
- Return type:
int
- exec(self, command: str | None) int [source]¶
Executes a
command
in the interpreter.Returns an interpreter specific state value.
- Parameters:
command (Optional[str])
- Return type:
int