1>>> import pyautogui
2
3>>> width, height= pyautogui.size()
4
5>>> print(width)
61366
7
8>>> print(height)
9768
1from win32api import GetSystemMetrics
2
3print("Width =", GetSystemMetrics(0))
4print("Height =", GetSystemMetrics(1))
5
1from screeninfo import get_monitors
2screen = get_monitors()[0]
3
4# if that raises an error, put this first
5# from os import environ
6# environ['DISPLAY'] = ':0.0'
7
8print(screen)