@staticmethod
def _available(binary):
    extensions = os.environ.get('PATHEXT', '').split(os.pathsep)
    for directory in os.environ.get('PATH', '').split(os.pathsep):
        base = os.path.join(directory, binary)
        options = ([base] + [(base + ext) for ext in extensions])
        for filename in options:
            if os.path.exists(filename):
                return True
    return False
@staticmethod
def _available(binary):
    extensions = os.environ.get('PATHEXT', ).split(os.pathsep)
    for directory in os.environ.get('PATH', ).split(os.pathsep):
        base = os.path.join(directory, binary)
        options = ([base] + [(base + ext) for ext in extensions])
        for filename in options:
            if os.path.exists(filename):
                return True
    return False