コード例 #1
0
 def is_working(self) -> bool:
     found = Command(self.path).locate()
     if not found:
         return False
     else:
         self.path = found
         return True
コード例 #2
0
    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
コード例 #3
0
 def is_working(self):
     return Command(self.path).locate()
コード例 #4
0
 def is_working(self) -> bool:
     found = Command(self.path).locate()
     if found:
         self.path = found
     return found