finds.dev← search

// the find

asweigart/PyGetWindow

★ 419 · Python · BSD-3-Clause · updated Jul 2024

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

PyGetWindow gives you a Python API to list, inspect, move, resize, and close application windows. It's aimed at desktop automation scripts — the kind of thing you'd use to wrangle open windows before taking a screenshot or driving a GUI test. Windows-only in practice despite the cross-platform name.

The API surface is genuinely clean — `getWindowsWithTitle`, `getWindowsAt`, and property access like `.topleft` and `.size` are exactly what you'd want. It installs as a single `pip install` with no build steps. The author (Al Sweigart, of *Automate the Boring Stuff* fame) has a track record of shipping usable tools for this exact audience. Works well enough for simple scripting tasks on Windows where you just need to wrangle a window position.

The README still says 'currently only the Windows platform is implemented' while macOS and Linux files exist in the source — that's a years-old lie the project never cleaned up, and the macOS implementation is known to be unreliable. The last real activity was sporadic; 419 stars but open issues accumulate with no response. There's essentially no test coverage for anything beyond trivial cases, so if you hit a multi-monitor setup or a DPI-scaled display you're on your own. If you need anything beyond basic window manipulation on Windows, PyWinCtl or pygetwindow's own fork ecosystem will serve you better.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →