Return full path of an executable.
(exe)
| 245 | |
| 246 | |
| 247 | def 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 | |
| 258 | class Processor(object): |
no test coverage detected