MCPcopy Create free account
hub / github.com/ipython/ipython / _find_cmd

Function _find_cmd

IPython/utils/_process_posix.py:34–39  ·  view source on GitHub ↗

Find the full path to a command using which.

(cmd)

Source from the content-addressed store, hash-verified

32#-----------------------------------------------------------------------------
33
34def _find_cmd(cmd):
35 """Find the full path to a command using which."""
36
37 path = sp.Popen(['/usr/bin/env', 'which', cmd],
38 stdout=sp.PIPE, stderr=sp.PIPE).communicate()[0]
39 return py3compat.decode(path)
40
41
42class ProcessHandler(object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected