def is_working(self) -> bool: found = Command(self.path).locate() if not found: return False else: self.path = found return True
def expand_program_files(path: str) -> str: if PROGRAM_FILES not in path: return path for candidate in [ r"C:\Program Files", r"C:\Program Files (x86)", r"C:\ProgramW6432" ]: possible = path.replace(PROGRAM_FILES, candidate) if Command.executable(possible): return possible
def is_working(self): return Command(self.path).locate()
def is_working(self) -> bool: found = Command(self.path).locate() if found: self.path = found return found