Class: QgsCodeEditorShell

A shell script code editor based on QScintilla2. Adds syntax highlighting and code autocompletion.

QgsCodeEditorShell supports either Bash (Linux) or Batch (Windows) code interpreters. By default the Batch interpreter will be used on Windows platforms and the Bash interpreter on all other platforms.

Added in version 3.32.

QgsCodeEditorShell containing a sample bash shell script

QgsCodeEditorShell containing a sample bash shell script

QgsCodeEditorShell containing a sample batch script

QgsCodeEditorShell containing a sample batch script

Class Hierarchy

Inheritance diagram of qgis.gui.QgsCodeEditorShell

Base classes

QgsCodeEditor

A text editor based on QScintilla2.

QsciScintilla

QsciScintillaBase

QAbstractScrollArea

QFrame

QWidget

QObject

QPaintDevice

class qgis.gui.QgsCodeEditorShell[source]

Bases: QgsCodeEditor

__init__(parent: QWidget | None = None, mode: QgsCodeEditor.Mode = QgsCodeEditor.Mode.ScriptEditor, language: Qgis.ScriptLanguage = Qgis.ScriptLanguage.Unknown)

Constructor for QgsCodeEditorShell.

The language argument may be Qgis.ScriptLanguage.Unknown, Qgis.ScriptLanguage.Bash or Qgis.ScriptLanguage.Batch. If the language is Qgis.ScriptLanguage.Unknown, then the Qgis.ScriptLanguage.Batch interpreter will be used on Windows platforms and the Qgis.ScriptLanguage.Bash interpreter on all other platforms.

Parameters:
  • parent (Optional[QWidget] = None)

  • mode (QgsCodeEditor.Mode = QgsCodeEditor.Mode.ScriptEditor)

  • language (Qgis.ScriptLanguage = Qgis.ScriptLanguage.Unknown)