예제 #1
0
파일: platform.py 프로젝트: davehunt/iris
class Platform(object):
    """Class that holds all supported operating systems (HIGH_DEF = High definition displays)."""
    WINDOWS = 'win'
    LINUX = 'linux'
    MAC = 'osx'
    ALL = get_os()
    HIGH_DEF = not (pyautogui.screenshot().size == pyautogui.size())
    SCREEN_WIDTH, SCREEN_HEIGHT = pyautogui.size()
    LOW_RES = (SCREEN_WIDTH < 1280 or SCREEN_HEIGHT < 800)
예제 #2
0
    def is_windows():
        """Checks if we are running on a Windows system.

        :return: True if we are running on a Windows system, False otherwise.
        """
        return get_os() == Platform.WINDOWS
예제 #3
0
    def is_mac():
        """Checks if we are running on a Mac system.

        :return: True if we are running on a Mac system, False otherwise.
        """
        return get_os() == Platform.MAC
예제 #4
0
    def is_linux():
        """Checks if we are running on a Linux system.

        :return: True if we are running on a Linux system, False otherwise.
        """
        return get_os() == Platform.LINUX
예제 #5
0
 def get_os():
     """Get the type of the operating system your script is running on."""
     return get_os()