Muscat.Helpers.IO.Which module

CheckIntegrity(GUI: bool = False) str[source]
Which(program: str) str[source]

Check if an executable is reachable and return the real “executable” (with the .exe or .bat )

inspiration from:

https://stackoverflow.com/questions/377017/test-if-executable-exists-in-python

Parameters:

program (str) – the name of the program to find, in windows the user can omit the .exe or the .bat extension

Returns:

return the string of the real executable or and empty string if the executable is not found

Return type:

str