Returns the path of an executable file.

    Searches for an executable with the given name, first in the `PATH`, 
    then in the current directory (recursively). Upon finding the file,
    returns the full filepath of it.

    Parameters
    ----------
    name : str
        The name of the executable. This is platform-independent so 
        you don't have to include any platform-specific file extension 
        (such as `.exe`).

    Returns
    -------
    str
        The path of the executable file. In case of multiple hits, it 
        only returns the first one.

def find_executable(name):
    """
    Returns the path of an executable file.

    Searches for an executable with the given name, first in the `PATH`, 
    then in the current directory (recursively). Upon finding the file,
    returns the full filepath of it.

    Parameters
    ----------
    name : str
        The name of the executable. This is platform-independent so 
        you don't have to include any platform-specific file extension 
        (such as `.exe`).

    Returns
    -------
    str
        The path of the executable file. In case of multiple hits, it 
        only returns the first one.
    """

    if sys.platform.startswith('win') or os.name.startswith('os2'):
        name = name + '.exe'

    executable_path = find_file(name, deep=True)
    return executable_path