def _iter_physical_monitors(close_handles=True):
    """Iterates physical monitors.
    The handles are closed automatically whenever the iterator is advanced.
    This means that the iterator should always be fully exhausted!
    If you want to keep handles e.g. because you need to store all of them and
    use them later, set `close_handles` to False and close them manually."""

def callback(hmonitor, hdc, lprect, lparam):
    monitors.append(HMONITOR(hmonitor))
return True
monitors = []
if not windll.user32.EnumDisplayMonitors(None, None, _MONITORENUMPROC(
    callback), None):
    raise WinError('EnumDisplayMonitors failed')
Отправка команд DDC/CI для мониторинга в Windows с помощью Python?