pywinpty
Pseudo terminal support for Windows from Python.
Decision gist · record as of 2026-08-14
Yes, if you are developing on Windows and need to spawn and interact with console processes programmatically. The package is actively maintained, has no runtime dependencies, carries a permissive license, and is stable (Production/Stable status). Install friction is moderate due to platform and Python version specificity, but prebuilt wheels are available for common configurations. No known vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Windows only; requires Python 3.10 or later.
- Medium install friction due to compiled wheels for Windows only (x86_64 and ARM64, Python 3.10–3.14).
- Active maintenance with recent release; no runtime dependencies simplifies deployment once installed.
License · maintenance · safety
permissive license (permissive) — Permissive license allows use in proprietary and open-source projects without copyleft obligations.
last release 2026-06-10 (65 days) · last repo commit 2026-06-23 · 165 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,235,965 downloads/mo, #2,132 on PyPI
Alternatives
Verify before relying
pip install pywinpty
from pywinpty import PtyProcess
proc = PtyProcess.spawn('python')
proc.write('print("hello")\r\n')
while proc.isalive():
print(proc.readline())- Whether prebuilt wheels cover all intended deployment targets and Python patch versions.
- Performance characteristics when spawning or managing many concurrent processes.
- Compatibility with Windows Subsystem for Linux (WSL) or other non-native Windows environments.
- Rust toolchain requirements when building from source.
What it is and what it does
PyWinpty is a Python wrapper around Windows pseudoterminal functionality, enabling applications to spawn and interact with console processes as if they were running in a terminal. It supports both the modern ConPTY interface and the legacy winpty library, abstracting away the complexity of Windows console I/O pipes. The package provides two usage levels: a high-level PtyProcess class for common spawning tasks, and a low-level PTY object for fine-grained control over process lifecycle, resizing, and I/O.
The package is compiled from Rust using PyO3 and Maturin, with prebuilt wheels available for Windows on x86_64 and ARM64 architectures across Python 3.10 through 3.14. It has no runtime dependencies, making it lightweight once installed. Active maintenance and permissive licensing make it suitable for both open-source and proprietary Windows terminal emulators, shells, and IDE integrations.
Use it for
- Build terminal emulators or shell frontends on Windows that spawn and manage interactive console applications.
- Implement IDE or editor integrations that need to run and capture output from Windows console tools and scripts.
- Create testing frameworks that spawn and interact with command-line programs on Windows systems.
- Develop remote terminal or SSH-like tools that require pseudoterminal support on Windows.
- Build automation scripts that need to interact with interactive console applications via stdin/stdout.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are developing on Windows and need to spawn and interact with console processes programmatically.
The package is actively maintained, has no runtime dependencies, carries a permissive license, and is stable (Production/Stable status). Install friction is moderate due to platform and Python version specificity, but prebuilt wheels are available for common configurations. No known vulnerabilities.
Install
pywinpty on PyPI
Before you install
Medium install friction due to compiled wheels for Windows only (x86_64 and ARM64, Python 3.10–3.14). Active maintenance with recent release; no runtime dependencies simplifies deployment once installed.
Windows only; requires Python 3.10 or later.
License in practice
Permissive license allows use in proprietary and open-source projects without copyleft obligations.
Quickstart
pip install pywinpty
from pywinpty import PtyProcess
proc = PtyProcess.spawn('python')
proc.write('print("hello")\r\n')
while proc.isalive():
print(proc.readline())
Verify before relying
- Whether prebuilt wheels cover all intended deployment targets and Python patch versions.
- Performance characteristics when spawning or managing many concurrent processes.
- Compatibility with Windows Subsystem for Linux (WSL) or other non-native Windows environments.
- Rust toolchain requirements when building from source.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 65 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,235,965 / month, #2,132 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseOperating System :: Microsoft :: WindowsProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: Free ThreadingProgramming Language :: RustTopic :: TerminalsTopic :: Terminals :: Terminal Emulators/X Terminals |
Evidence: pywinpty-3.0.5-cp310-cp310-win_amd64.whl; pywinpty-3.0.5-cp310-cp310-win_arm64.whl; pywinpty-3.0.5-cp311-cp311-win_amd64.whl; pywinpty-3.0.5-cp311-cp311-win_arm64.whl; pywinpty-3.0.5-cp312-cp312-win_amd64.whl; pywinpty-3.0.5-cp312-cp312-win_arm64.whl; pywinpty-3.0.5-cp313-cp313t-win_amd64.whl; pywinpty-3.0.5-cp313-cp313t-win_arm64.whl; pywinpty-3.0.5-cp313-cp313-win_amd64.whl; pywinpty-3.0.5-cp313-cp313-win_arm64.whl; pywinpty-3.0.5-cp314-cp314t-win_amd64.whl; pywinpty-3.0.5-cp314-cp314t-win_arm64.whl; pywinpty-3.0.5-cp314-cp314-win_amd64.whl; pywinpty-3.0.5-cp314-cp314-win_arm64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “windows pseudoterminal python”
- pywinptyPyWinpty creates and manages pseudoterminals on Windows, allowing…
- pywin32Provides Python access to Windows APIs and COM interfaces for…
- jaraco.windowsProvides a pure-Python interface to Windows APIs via ctypes, allowing…
Give your agent the search over MCP, or paste the wish link into any chat.
More Terminals packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Rich renders styled text, tables, progress bars, syntax highlighting, markdown, and tracebacks to the terminal with minimal code.
Colorama makes ANSI escape sequences for colored terminal text work on Windows by intercepting and converting them to win32 API calls, while passing through unchanged on other platforms.
Install it if you need colored terminal output to work on Windows or want to use ANSI-based libraries portably; skip it only if you target non-Windows platforms…
Measures the displayed width of Unicode strings in terminals, accounting for wide characters, combining marks, and terminal escape sequences that standard Python string functions mishandle.
Install it if your application formats text for terminals and handles non-ASCII characters.
Run a subprocess in a pseudo terminal (pty) and interact with its input and output, enabling automation of interactive programs that require terminal features like password prompts or curses-style interfaces.
However, note that it is aging (last release 2020-12-28) and not actively maintained; it works well for its narrow, well-defined purpose but won't receive updates for…
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
See also dockerpty · pccm · cmsis-pack-manager · maturin · win_unicode_console · ignore-python · wmctrl · pypsrp