skillfed

PyGetWindow

A simple, cross-platform module for obtaining GUI information on application's windows.

pygetwindow v0.0.9 2.9M downloads/30d#2,823 on PyPI419
Permissive license BSD DORMANT released

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 pygetwindow

uv

uv add pygetwindow

poetry

poetry add pygetwindow

Installing 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

Development Status :: 4 - BetaEnvironment :: MacOS XEnvironment :: Win32 (MS Windows)Environment :: X11 ApplicationsIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7

Tags

window control and manipulationgui window information retrievalget active window titlewindow position and sizecross-platform window managementfind window by titleminimize maximize close window
window-automationgui-controldesktop-automation

More Software Development packages