parameters: (*exes)
return_statement: return None
docstring: Find an executable, ie. the first on the path.
docstring_summary: Find an executable, ie. the first on the path.
docstring_tokens: Find an executable ie . the first on the path .
function: def _find_exe(*exes):
          """ Find an executable, ie. the first on the path. """
  
          path_dirs = os.environ.get('PATH', '').split(os.pathsep)
  
          for exe in exes:
              # Strip any surrounding quotes.
              if exe.startswith('"') and exe.endswith('"'):
                  exe = exe[1:-1]
  
              if sys.platform == 'win32':
                  exe = exe + '.exe'
  
              for d in path_dirs:
                  exe_path = os.path.join(d, exe)
  
                  if os.access(exe_path, os.X_OK):
                      return exe_path
  
          return None
function_tokens: def _find_exe ( * exes ) : path_dirs = os . environ . get ( 'PATH' , '' ) . split ( os . pathsep ) for exe in exes : # Strip any surrounding quotes. if exe . startswith ( '"' ) and exe . endswith ( '"' ) : exe = exe [ 1 : - 1 ] if sys . platform == 'win32' : exe = exe + '.exe' for d in path_dirs : exe_path = os . path . join ( d , exe ) if os . access ( exe_path , os . X_OK ) : return exe_path return None