qsubprocess

Module to handle running tools in a QProcess.

author:
  1. Savolainen (VTT)
date:

1.2.2018

Module Contents

class qsubprocess.QSubProcess(toolbox, program=None, args=None, silent=False, semisilent=False)[source]

Bases: PySide2.QtCore.QObject

Class to handle starting, running, and finishing PySide2 QProcesses.

subprocess_finished_signal[source]
program(self)[source]

Program getter method.

args(self)[source]

Program argument getter method.

start_process(self, workdir=None)[source]

Start the execution of a command in a QProcess.

Parameters:workdir (str) – Script directory
wait_for_finished(self, msecs=30000)[source]

Wait for subprocess to finish.

Returns:True if process finished successfully, False otherwise
process_started(self)[source]

Run when subprocess has started.

on_state_changed(self, new_state)[source]

Runs when QProcess state changes.

Parameters:new_state (QProcess::ProcessState) – Process state number
on_process_error(self, process_error)[source]

Run if there is an error in the running QProcess.

Parameters:process_error (QProcess::ProcessError) – Process error number
terminate_process(self)[source]

Shutdown simulation in a QProcess.

process_finished(self, exit_code)[source]

Run when subprocess has finished.

Parameters:exit_code (int) – Return code from external program (only valid for normal exits)
on_ready_stdout(self)[source]

Emit data from stdout.

on_ready_stderr(self)[source]

Emit data from stderr.