exec_sh_async#

ignis.utils.Utils.exec_sh_async(command: str, on_finished: Callable | None = None) gi.repository.Gio.Subprocess#

Execute a shell (bash) command asynchronously.

Parameters:
  • command (str) -- The command to execute.

  • on_finished (Callable | None, default: None) -- A function to call when the process is finished. An instance of AsyncCompletedProcess will be passed to this function.

Return type:

Subprocess

Returns:

The instance of Gio.Subprocess.

class ignis.utils.exec_sh.AsyncCompletedProcess(process: gi.repository.Gio.Subprocess) None#

Completed process object for exec_sh_async().

property returncode: int#

The return code of the process.

property stdout: str | None#

The output of the process.

property stderr: str | None#

The stderr (errors) of the process.