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

Method sh

IPython/utils/_process_posix.py:45–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

43
44 @property
45 def sh(self) -> str | None:
46 if self._sh is None:
47 import pexpect
48 shell_name = os.environ.get("SHELL", "sh")
49 self._sh = pexpect.which(shell_name)
50 if self._sh is None:
51 raise OSError('"{}" shell not found'.format(shell_name))
52
53 return self._sh
54
55 def __init__(self) -> None:
56 """Arguments are used for pexpect calls."""

Callers

nothing calls this directly

Calls 2

getMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected