you can get current screen info for all monitors
you must install screeninfo if not already installed:
then run:
you must install screeninfo if not already installed:
pip install screeninfo
then run:
import screeninfo for n, monitor in enumerate(screeninfo.get_monitors()): print(monitor) print(f"\nMonitor {n}:") print(f" width pixels: {monitor.width}") print(f" height pixels: {monitor.height}") print(f" width mm: {monitor.width_mm}") print(f" height mm: {monitor.height_mm}") print(f" monitor name: {monitor.name}")Typical output
Output:Monitor 0:
width pixels: 1920
height pixels: 1080
width mm: 598
height mm: 336
monitor name: DVI-I-1