Running Commands

ornithology.run_command(args, stdin=None, timeout=60, echo=False, suppress=False)[source]

Execute a command.

Parameters:
  • args (List[str]) – The command to run, as a list of strings.

  • stdin (Optional[str]) – Any stdin to pass to the command.

  • timeout (int) – If the command does not return within this time, a TimeoutError will be raised.

  • echo (bool) – If True, the stdout and stderr of the command will be printed.

  • suppress (bool) – If True, the details of the command execution will be truncated.

Return type:

CompletedProcess