--- id: ptyprocess version: "0.7.0" license: unclear license_treatment: permissive maintenance: aging --- # ptyprocess — Run a subprocess in a pseudo terminal License: permissive · Maintenance: aging · Popularity: top 1,000 on PyPI ## Install pip install ptyprocess uv add ptyprocess poetry add ptyprocess ## Description Launch a subprocess in a pseudo terminal (pty), and interact with both the process and its pty. Sometimes, piping stdin and stdout is not enough. There might be a password prompt that doesn't read from stdin, output that changes when it's going to a pipe rather than a terminal, or curses-style interfaces that rely on a terminal. If you need to automate these things, running the process in a pseudo terminal (pty) is the answer. Interface:: p = PtyProcessUnicode.spawn(['python']) p.read(20) p.write('6+6\n') p.read(20) ## AI interpretation — verify before relying Launches a subprocess in a pseudo terminal (pty) and provides read/write interaction with both the process and its terminal, enabling automation of password prompts, terminal-dependent output, and curses-style interfaces. Verdict: ptyprocess is a stable, low-friction library for terminal automation with no dependencies, but its last release was over five years ago. Suitable for production use in established workflows, though users should verify compatibility with their Python version and be aware that maintenance is minimal. [View on SkillFed](https://skillfed.io/packages/ptyprocess) · [View on PyPI](https://pypi.org/project/ptyprocess/)