You are viewing an older version (9.10.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.10.0 / IPython / utils / _process_posix / ProcessHandler / getoutput

function

IPython.utils._process_posix:ProcessHandler.getoutput

source: /IPython/utils/_process_posix.py :59

Signature

def   getoutput ( self cmd : str )  →  str | None

Summary

Run a command and return its stdout/stderr as a string.

Parameters

cmd : str

A command to be executed in the system shell.

Returns

output : str

A string containing the combination of stdout and stderr from the

: subprocess, in whatever order the subprocess originally wrote to its
: file descriptors (so the order of the information in this string is the
: correct order as would be seen if running the command in a terminal).

Aliases

  • IPython.utils._process_posix.ProcessHandler.getoutput