$npx skillfedfor your agent

ptyprocess

Run a subprocess in a pseudo terminal

With conditionsPyPI TerminalsReleased Dec 2020205.2M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — ptyprocess-0.7.0-py2.py3-none-any.whl
v0.7.0 · released 2020-12-28

Yes, if you need to automate interactive terminal programs on Unix/POSIX systems. The package is stable and has no known vulnerabilities. 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 new Python features or terminal standards. Not usable on Windows.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Unix/POSIX systems only (macOS, Linux); pty is not available on Windows.
  • Low install friction with a pure-Python wheel.
  • Maintenance is aging—the latest release was 2020-12-28 and the repository shows no recent commits, though it remains archived=false and is in production/stable status.

License · maintenance · safety

permissive license (permissive) — ISC License (permissive) allows use in most projects with minimal restrictions; attribution is typically required but no copyleft obligations apply.

last release 2020-12-28 (2055 days) · last repo commit 2025-07-17 · 238 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 205,236,250 downloads/mo, #200 on PyPI

Verify before relying

pip install ptyprocess

from ptyprocess import PtyProcessUnicode
p = PtyProcessUnicode.spawn(['python'])
p.read(20)
p.write('6+6\n')
p.read(20)
  • Whether the package works reliably with modern Python versions beyond those listed in classifiers (2.7, 3).
  • Current status of any known issues with Unicode handling or terminal control sequences.
Same gist for agents: .md · .json

What it is and what it does

ptyprocess wraps the Unix pty (pseudo-terminal) interface to run a subprocess in a full terminal environment rather than through simple pipes. This is essential when you need to automate programs that detect whether they're connected to a real terminal—many tools change their output format, disable colors, or fail entirely when piped. It lets you interact with password prompts, terminal-based UIs, and programs that use terminal control sequences as if you were typing at a real console.

The package provides a straightforward API: spawn a process with a command, then read from and write to it as you would with a terminal session. It handles the low-level pty setup so you don't have to. It has no runtime dependencies and installs as a pure-Python wheel, making it lightweight and portable across Unix-like systems.

Use it for

  • Automate interactive CLI tools that prompt for passwords or user input without reading from stdin.
  • Test terminal-based applications that behave differently when output is piped versus displayed on a real terminal.
  • Control curses-style or full-screen terminal interfaces programmatically.
  • Build expect-like automation scripts for legacy or interactive command-line programs.
  • Capture colored output and terminal control sequences from programs that strip them when piped.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to automate interactive terminal programs on Unix/POSIX systems.

The package is stable and has no known vulnerabilities. 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 new Python features or terminal standards. Not usable on Windows.

Install

ptyprocess on PyPI

Before you install

Low install friction with a pure-Python wheel. Maintenance is aging—the latest release was 2020-12-28 and the repository shows no recent commits, though it remains archived=false and is in production/stable status.

Unix/POSIX systems only (macOS, Linux); pty is not available on Windows.

License in practice

ISC License (permissive) allows use in most projects with minimal restrictions; attribution is typically required but no copyleft obligations apply.

Quickstart

pip install ptyprocess

from ptyprocess import PtyProcessUnicode
p = PtyProcessUnicode.spawn(['python'])
p.read(20)
p.write('6+6\n')
p.read(20)

Verify before relying

  • Whether the package works reliably with modern Python versions beyond those listed in classifiers (2.7, 3).
  • Current status of any known issues with Unicode handling or terminal control sequences.

Package facts

Licensepermissive license permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 2,055 days since the last release
Last repo commit
First released
Downloads205,236,250 / month, #200 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: ISC License (ISCL)Operating System :: MacOS :: MacOS XOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Topic :: Terminals

Evidence: ptyprocess-0.7.0-py2.py3-none-any.whl

Tags

Capabilities
pseudo terminal subprocesspty process automationinteractive program controlterminal emulation pythonpassword prompt automationcurses interface automationstdin stdout terminal
Topics
terminal-automationsubprocess-control

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 › “pseudo terminal subprocess”

  • ptyprocessRun a subprocess in a pseudo terminal (pty) and interact with its…
  • subprocess-multiteeMultiplexes subprocess stdout/stderr to multiple destinations…
  • diffqDiffQ performs differentiable quantization of PyTorch models using…

Give your agent the search over MCP, or paste the wish link into any chat.

More Terminals packages

tqdm Worth it
PyPI · Libraries · released Jul 2026

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.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
rich Worth it
PyPI · Terminals · released Apr 2026

Rich renders styled text, tables, progress bars, syntax highlighting, markdown, and tracebacks to the terminal with minimal code.

MITpure Python · 3.9.0+
613.9Mdownloads / mo
colorama Worth it
PyPI · Terminals · released Oct 2022

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…

BSD-3-Clausepure Python
431.0Mdownloads / mo
wcwidth Worth it
PyPI · Libraries · released Jun 2026

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.

MITpure Python · 3.8+
306.5Mdownloads / mo
pexpect With conditions
PyPI · Software Development · released Nov 2023

Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.

ISCpure Pythonaging
200.8Mdownloads / mo
termcolor Worth it
PyPI · Terminals · released Dec 2025

Adds ANSI color and text formatting (bold, underline, blink, reverse, etc.) to terminal output, with support for named colors, RGB tuples, and automatic terminal capability detection.

Install it if you need ANSI color formatting in any Python CLI, script, or logging system.

MITpure Python · 3.10+
105.6Mdownloads / mo

See also dockerpty · pywinpty · bash · inputimeout · pairmux · subprocess-multitee · EasyProcess · sh · scripttest