I would like to know if there is a way I could check from my python code if matlab exists on a system. So far the only thing I can come up with is: exists = os.system("matlab") and then parse the exists for a command not found. But I’m almost sure this will:
- Start matlab in case it exists on the system. I don’t want this.
- The response may vary depending on the system I’m running ?
So is there any way I could check if a matlab installation is available on the system from python ?
Regards,
Bogdan
Assuming your system call works, you can check the path for matlab.exe like this:
For Unix, you have to change split(“;”) to split(“:”) and “matlab.exe” to whatever the matlab executable is called under Unix.