pymodalib.utils.matlab_runtime module¶
-
exception
MatlabLibraryException
¶ Bases:
Exception
Exception raised when a MATLAB-packaged library is missing.
-
class
RuntimeStatus
¶ Bases:
enum.Enum
Enum representing the status of the MATLAB Runtime.
-
EXISTS
= 0¶
-
MAYBE_EXISTS
= 1¶
-
NOT_EXISTS
= 2¶
-
-
get_link_to_runtime_docs
() → str¶ Gets a link to the section of the MATLAB documentation which explains how to add the MATLAB Runtime to the PATH.
Returns: The URL for the relevant page of the MATLAB documentation. Return type: str
-
get_matlab_runtime_versions
() → List[int]¶ Gets all the installed MATLAB Runtime versions which can be found.
Returns: List containing every MATLAB Runtime version which is installed, as their version numbers (e.g. 96). Return type: List[int]
-
get_path_items
(platform: pymodalib.utils.Platform.Platform) → List[str]¶ Gets all items from the system PATH.
Parameters: platform (Platform) – The platform corresponding to OS. Returns: List containing all the items on the system PATH. Return type: List[str]
-
get_runtime_status
() → pymodalib.utils.matlab_runtime.RuntimeStatus¶ Gets the status of the Matlab Runtime.
Returns: The status of the MATLAB Runtime. Return type: RuntimeStatus
-
get_runtime_version_linux
(var: str) → Optional[int]¶
-
get_runtime_version_mac_os
(var: str) → Optional[int]¶
-
get_runtime_version_windows
(var: str) → Optional[int]¶ Gets the version of the MATLAB Runtime on Windows from a value in an environment variable.
Parameters: var (str) – The value of the item in the environment variable. Returns: version – If a version can be found, its integer representation is returned (e.g. 96); otherwise, None. Return type: int, None
-
is_runtime_valid
(versions: List[int]) → bool¶ Checks whether any of the currently installed MATLAB Runtime versions is valid.
Parameters: versions (List[int]) – All the currently installed MATLAB Runtime versions, as their version numbers. Returns: Whether a compatible MATLAB Runtime is installed. Return type: bool
-
try_to_setup_runtime_variables
() → None¶ Attempts to setup the MATLAB Runtime environment variables.