'Returns the path of the desired python interpreter.'

def find_desired_python(self):

    pythons = []
    for glob_str in self.PYTHON_BIN_GLOB_STRINGS:
        pythons.extend(glob.glob(glob_str))
    possible_versions = []
    best_python = ((0, 0), '')
    for python in pythons:
        version = self.extract_version(python)
        if (version >= (2, 4)):
            possible_versions.append((version, python))
    possible_versions.sort()
    if (not possible_versions):
        raise ValueError('Python    2.x    version    2.4    or    better    is    required')
    return possible_versions[0][1]
