MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / which

Method which

web/pgadmin/misc/bgprocess/processes.py:472–482  ·  view source on GitHub ↗
(self, program, paths)

Source from the content-addressed store, hash-verified

470 return interpreter
471
472 def which(self, program, paths):
473 def is_exe(fpath):
474 return os.path.exists(fpath) and os.access(fpath, os.X_OK)
475
476 for path in paths:
477 if not os.path.isdir(path):
478 continue
479 exe_file = os.path.join(u_encode(path, fs_encoding), program)
480 if is_exe(exe_file):
481 return file_quote(exe_file)
482 return None
483
484 def read_log(self, logfile, log, pos, ctime, ecode=None, enc='utf-8'):
485 import re

Callers 1

Calls 3

u_encodeFunction · 0.90
file_quoteFunction · 0.90
joinMethod · 0.80

Tested by

no test coverage detected