PyGetWindow
A simple, cross-platform module for obtaining GUI information on application's windows.
What it is and what it does
PyGetWindow is a cross-platform GUI window control library that lets you query, locate, and manipulate application windows. It provides functions to retrieve all open windows, search by title, find windows at specific screen coordinates, and get the currently active window. Once you have a Window object, you can read its position, size, and state (minimized/maximized), and perform actions like move, resize, minimize, maximize, restore, activate, and close.
The package is designed for automation and testing scenarios where you need programmatic control over desktop windows. It currently has full implementation only for Windows; macOS and X11 support are noted as incomplete. The project is dormant—last released in October 2020—so it may not be actively maintained or tested against the latest Python versions.
Use it for:
- Automate window management in test suites that need to verify UI behavior across multiple application windows.
- Build desktop automation scripts that locate and manipulate windows by title or screen position.
- Create monitoring or logging tools that track active windows and their properties on Windows systems.
- Develop accessibility tools that programmatically control window state and position for users.
- Write integration tests that require opening, resizing, and closing application windows in a controlled manner.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyGetWindow provides functions to query, identify, and control application windows on Windows, macOS, and X11 systems—retrieving window objects by title or screen position, and manipulating their state, size, and position.
Yes, if you are on Windows and need straightforward window control for automation or testing. No, if you require active maintenance, support for modern Python versions, or cross-platform macOS/Linux support—the project is dormant and only Windows is fully implemented. Consider only if you can tolerate potential compatibility issues with current Python releases.
Install
pygetwindow on PyPI
pip
pip install pygetwindowuv
uv add pygetwindowpoetry
poetry add pygetwindowInstalling PyGetWindow
Before you install
High install friction: the package is dormant (last release October 2020, last commit July 2024) with no runtime dependencies, but the source distribution format and lack of recent maintenance may complicate installation on modern Python environments.
License in practice
BSD license is permissive; you may use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
pip install pygetwindow
import pygetwindow as gw
# Get all open window titles
titles = gw.getAllTitles()
# Find windows by title
windows = gw.getWindowsWithTitle('Notepad')
if windows:
window = windows[0]
window.maximize()
print(window.title, window.size)
Windows platform required for full functionality; macOS and X11 support incomplete per project description. Python version compatibility uncertain beyond 3.7 due to dormant maintenance status.
Verify before relying
- Whether the package works reliably on modern Python versions beyond 3.7, given classifiers list only up to 3.7 and the project is dormant.
- Current state of macOS and X11 support; description notes only Windows is implemented.
- Whether the package installs and functions on current Python 3.x releases without modification.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | dormant — 2,140 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,919,941/month — #2,823 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: PyGetWindow-0.0.9.tar.gz
Keywords: gui, window, geometry, resize, minimize, maximize, close, title
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
wmctrlwmctrl provides programmatic control over…
permissive · top 15,000 on PyPI
PyAutoGUIPyAutoGUI programmatically controls the mouse…
permissive · top 5,000 on PyPI
pwinputDisplays mask characters (like asterisks) as…
permissive · top 15,000 on PyPI
pyshortcutsCreates desktop and Start Menu shortcuts for…
permissive · top 15,000 on PyPI
pywinautoAutomate Microsoft Windows GUI interactions by…
permissive · top 5,000 on PyPI
PyAutoItPyAutoIt provides Python bindings to…
permissive · top 15,000 on PyPI
universal-startfileProvides a cross-platform wrapper around…
permissive · top 15,000 on PyPI
PyWinBoxPyWinBox manages window positions, sizes, and…
permissive · top 15,000 on PyPI
pyperclipPyperclip provides simple cross-platform access…
permissive · top 1,000 on PyPI
EWMHlibQuery and control window managers that…
permissive · top 15,000 on PyPI