def which(program):
    """Identify the location of an executable file."""
    if os.path.split(program)[0]:
        program_path = find_exe(program)
        if program_path:
            return program_path
    else:
        for path in get_path_list():
            program_path = find_exe(os.path.join(path, program))
            if program_path:
                return program_path
    return None
def which(program):
    """Identify the location of an executable file."""
    if os.path.split(program)[0]:
        program_path = find_exe(program)
        if program_path:
            return program_path
    else:
        for path in get_path_list():
            program_path = find_exe(os.path.join(path, program))
            if program_path:
                return program_path
    return None
def which ( program ) : if os . path . split ( program ) [ 0 ] : program_path = find_exe ( program ) if program_path : return program_path else : for path in get_path_list ( ) : program_path = find_exe ( os . path . join ( path , program ) ) if program_path : return program_path return None
Identify the location of an executable file.
Identify the location of an executable file .