Class: QgsRunProcess

class qgis.core.QgsRunProcess

Bases: PyQt5.QtCore.QObject

A class that executes an external program/script.

It can optionally capture the standard output and error from the process and displays them in a dialog box.

On some platforms (e.g. iOS) , the process execution is skipped https://lists.qt-project.org/pipermail/development/2015-July/022205.html

Methods

create

param action:

dialogGone

processError

param a0:

processExit

param a0:

splitCommand

Splits the string command into a list of tokens, and returns the list.

stderrAvailable

stdoutAvailable

create(action: str | None, capture: bool) QgsRunProcess | None
Parameters:
  • action (Optional[str])

  • capture (bool)

Return type:

Optional[QgsRunProcess]

dialogGone(self)
processError(self, a0: QProcess.ProcessError)
Parameters:

a0 (QProcess.ProcessError)

processExit(self, a0: int, a1: QProcess.ExitStatus)
Parameters:
  • a0 (int)

  • a1 (QProcess.ExitStatus)

splitCommand(command: str | None) List[str]

Splits the string command into a list of tokens, and returns the list.

Tokens with spaces can be surrounded by double quotes; three consecutive double quotes represent the quote character itself.

Added in version 3.18.

Parameters:

command (Optional[str])

Return type:

List[str]

stderrAvailable(self)
stdoutAvailable(self)