Get Screen Size of Each Monitor using Python

screeninfo module

  1. Install screeninfo module from the command line:
pip install screeninfo
  1. Get the screen size of each monitor:
from screeninfo import get_monitors

for monitor in get_monitors():
    width = monitor.width
    height = monitor.height

    print(str(width) + 'x' + str(height))

Leave a Comment

Cancel reply

Your email address will not be published.