surfa.system.collect_output#

surfa.system.collect_output(command, executable='/bin/bash')#

Collect the output of a shell command.

Parameters
  • command (str) – Command to run.

  • executable (str) – Shell executable. Defaults to bash.

Returns

Tuple containing the command output and the corresponding exit code.

Return type

tuple of (str, int)