Overview of PyWinCtl
masterPyWinCtl is a cross-platform Python library for discovering, controlling, and monitoring desktop windows on Windows, macOS, and Linux. It provides a unified API that uses native backends: Win32 API on Windows, Apple Script on macOS, and EWMH/Xlib on Linux.
Common use cases include:
- Finding windows by title or PID.
- Moving, resizing, or snapping windows.
- Activating or bringing windows to the front.
- Monitoring window state changes (closing, moving, title changes) in real time.
- Automating GUI workflows and multi-window test harnesses.
- Getting exact window coordinates for screen capture tools (e.g., with
mssorOpenCV).