MCPcopy Index your code
hub / github.com/ipython/ipython / getoutputerror

Function getoutputerror

IPython/utils/_process_common.py:146–161  ·  view source on GitHub ↗

Return (standard output, standard error) of executing cmd in a shell. Accepts the same arguments as os.system(). Parameters ---------- cmd : str or list A command to be executed in the system shell. Returns ------- stdout : str stderr : str

(cmd: str | list[str])

Source from the content-addressed store, hash-verified

144
145
146def getoutputerror(cmd: str | list[str]) -> tuple[str, str]:
147 """Return (standard output, standard error) of executing cmd in a shell.
148
149 Accepts the same arguments as os.system().
150
151 Parameters
152 ----------
153 cmd : str or list
154 A command to be executed in the system shell.
155
156 Returns
157 -------
158 stdout : str
159 stderr : str
160 """
161 return get_output_error_code(cmd)[:2]
162
163
164def get_output_error_code(cmd: str | list[str]) -> tuple[str, str, int | None]:

Callers 1

test_getoutput_errorMethod · 0.90

Calls 1

get_output_error_codeFunction · 0.85

Tested by 1

test_getoutput_errorMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…