# ptyprocess

> Run a subprocess in a pseudo terminal

- **URL**: https://www.freshcrate.ai/projects/ptyprocess
- **Author**: Thomas Kluyver
- **Category**: Prompt Engineering
- **Latest version**: `0.7.0` (2026-04-21)
- **License**: Unknown
- **Source**: https://github.com/pexpect/ptyprocess
- **Language**: Python
- **GitHub**: 238 stars, 72 forks
- **Registry**: pypi (`ptyprocess`)
- **Tags**: `pypi`

## 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)

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `0.7.0` | 2026-04-21 | Low | Imported from PyPI (0.7.0) |
| `0.6.0` | 2018-06-22 | Low | Pull requests #36, #38, #41, #45. |

## Citation

- HTML: https://www.freshcrate.ai/projects/ptyprocess
- Markdown: https://www.freshcrate.ai/projects/ptyprocess.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/ptyprocess/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
