MCPcopy Create free account
hub / github.com/ActiveState/code / which

Function which

recipes/Python/546532_PyChecker_postprocessor/recipe-546532.py:247–255  ·  view source on GitHub ↗

Return full path of an executable.

(exe)

Source from the content-addressed store, hash-verified

245
246
247def which(exe):
248 '''Return full path of an executable.
249 '''
250 for d in _PATH:
251 for x in _xtensions:
252 p = quoted(os.path.join(d, exe) + x)
253 if os.access(p, os.X_OK):
254 return p
255 raise OSError('no such executable: %s' % (exe,))
256
257
258class Processor(object):

Callers 2

__init__Method · 0.70
recipe-546532.pyFile · 0.70

Calls 3

quotedFunction · 0.85
joinMethod · 0.45
accessMethod · 0.45

Tested by

no test coverage detected