pywinauto
A set of Python modules to automate the Microsoft Windows GUI
What it is and what it does
Pywinauto is a Python library for automating the Microsoft Windows graphical user interface. It lets you programmatically control windows, dialogs, and UI controls by sending mouse clicks and keyboard input, and extracting text data from controls. The library supports two backends: Win32 API (the default, lower-level) and MS UI Automation (higher-level, for modern Windows applications). It's commonly used for GUI testing, repetitive task automation, and integration testing of Windows desktop applications.
The package depends on pywin32 and comtypes for Windows-specific functionality, python-xlib for Linux support, and six for Python 2/3 compatibility. Installation is straightforward via pip with low friction. The codebase is stable and actively maintained, with a long history dating back to 2006 and a permissive BSD 3-clause license.
Use it for:
- Automate repetitive Windows desktop tasks like form filling, menu navigation, and dialog interaction in legacy or custom applications.
- Write integration tests for Windows GUI applications that verify UI behavior, control state, and user workflows.
- Build test automation scripts for quality assurance of Windows desktop software without modifying the application code.
- Extract data from Windows applications by automating navigation and reading control text and properties.
- Create end-to-end test suites for Windows-based business applications as part of continuous integration pipelines.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Automate Microsoft Windows GUI interactions by sending mouse and keyboard actions to windows, dialogs, and controls, with support for both Win32 API and MS UI Automation backends.
Yes, if you need to automate Windows GUI interactions or test Windows desktop applications. The library is mature, actively maintained, has no known vulnerabilities, and carries a permissive license. Install friction is low and dependencies are standard. The main constraint is that it is Windows-specific for core functionality, so it is only suitable for Windows automation tasks.
Install
pywinauto on PyPI
pip
pip install pywinautouv
uv add pywinautopoetry
poetry add pywinautoInstalling pywinauto
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with recent commits and a large user base (6144 stars); last release was recent, though the repository shows 585 days since the most recent release, suggesting a stable but not rapidly-iterated codebase.
License in practice
Distributed under BSD 3-clause (permissive), allowing commercial and private use with minimal restrictions. No licensing friction for most use cases.
Quickstart
pip install pywinauto
from pywinauto.application import Application
app = Application().start("notepad.exe")
app.UntitledNotepad.Edit.type_keys("Hello World", with_spaces=True)
Windows-only for most functionality; Win32 API backend requires Windows. User input emulation modules (mouse, keyboard) work on Windows and Linux, but core GUI automation is Windows-specific.
Verify before relying
- Current Python version support beyond the classifiers listed (2.7, 3.5, 3.6, 3.7)
- Whether the cross-platform roadmap mentioned (Linux in 2018, macOS in 2019) has been realized
- Status of the record-replay generator feature mentioned as under development
Package facts
| License | BSD 3-clause (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — six, python-xlib, comtypes, pywin32 |
| Maintenance | actively maintained — 585 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,060,852/month — #2,770 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pywinauto-0.6.9-py2.py3-none-any.whl
Keywords: windows, gui, automation, GuiAuto, testing, test, desktop, mouse, keyboard
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
PyAutoItPyAutoIt provides Python bindings to…
permissive · top 15,000 on PyPI
uiautomationAutomates Windows UI controls and windows by…
permissive · top 15,000 on PyPI
PyAutoGUIPyAutoGUI programmatically controls the mouse…
permissive · top 5,000 on PyPI
pywin32Provides Python access to Windows APIs and COM…
permissive · top 1,000 on PyPI
pypiwin32Installs pywin32 as a dependency, providing…
unclear · top 5,000 on PyPI
PyDirectInputAutomates mouse and keyboard input on Windows…
permissive · top 15,000 on PyPI
PyGetWindowPyGetWindow provides functions to query,…
permissive · top 5,000 on PyPI
pywin32-ctypesA pure-Python reimplementation of pywin32 that…
permissive · top 5,000 on PyPI
robotframework-whitelibraryWhiteLibrary automates Windows GUI testing for…
permissive · top 15,000 on PyPI
easyguiEasyGUI provides simple, non-event-driven GUI…
permissive · top 5,000 on PyPI