oscheck
Utils func to check current OS
Classes:
-
OSCheck–Utils class OSCheck
Functions:
-
check_os–Function to check the operating system of the current machine.
-
get_unix_distro–Function to get the Unix distribution name.
OSCheck
Utils class OSCheck
Class to check the operating system of the current machine.
Methods:
-
is_linux_machine–Method to check if the current machine is running a Linux operating system.
-
is_macos_machine–Method to check if the current machine is running a macOS operating system.
-
is_posix_compatible–Method to check if the current machine is POSIX compatible.
-
is_unix_machine–Method to check if the current machine is running a Unix-like operating system.
-
is_windows_machine–Method to check if the current machine is running a Windows operating system.
is_linux_machine
staticmethod
is_linux_machine() -> bool
Method to check if the current machine is running a Linux operating system.
Returns:
-
bool–True if the machine is running Linux, False otherwise.
is_macos_machine
staticmethod
is_macos_machine() -> bool
Method to check if the current machine is running a macOS operating system.
Returns:
-
bool–True if the machine is running macOS, False otherwise.
is_posix_compatible
staticmethod
is_posix_compatible() -> bool
Method to check if the current machine is POSIX compatible.
Returns:
-
bool–True if the machine is POSIX compatible, False otherwise.
is_unix_machine
staticmethod
is_unix_machine() -> bool
Method to check if the current machine is running a Unix-like operating system.
Returns:
-
bool–True if the machine is running a Unix-like system, False otherwise.
is_windows_machine
staticmethod
is_windows_machine() -> bool
Method to check if the current machine is running a Windows operating system.
Returns:
-
bool–True if the machine is running Windows, False otherwise.
check_os
Function to check the operating system of the current machine.
Returns:
-
dict–A dictionary containing the operating system name and version.
get_unix_distro
get_unix_distro() -> str
Function to get the Unix distribution name.
Returns:
-
str–The Unix distribution name.