--- id: pexpect version: "4.9.0" license: ISC license license_treatment: permissive maintenance: aging --- # pexpect — Pexpect allows easy control of interactive console applications. License: permissive · Maintenance: aging · Popularity: top 1,000 on PyPI ## Install pip install pexpect uv add pexpect poetry add pexpect ## Description Pexpect is a pure Python module for spawning child applications; controlling them; and responding to expected patterns in their output. Pexpect works like Don Libes' Expect. Pexpect allows your script to spawn a child application and control it as if a human were typing commands. Pexpect can be used for automating interactive applications such as ssh, ftp, passwd, telnet, etc. It can be used to automate setup scripts for duplicating software package installations on different servers. It can be used for automated software testing. Pexpect is in the spirit of Don Libes' Expect, but Pexpect is pure Python. The main features of Pexpect require the pty module in the Python standard library, which is only available on Unix-like systems. Some features—waiting for patterns from file descriptors or subprocesses—are also available on Windows. ## AI interpretation — verify before relying Pexpect spawns and controls child applications interactively, automating responses to expected output patterns. It enables scripting of interactive programs like ssh, ftp, and telnet as if a human were typing commands. Verdict: Pexpect is a stable, well-established library for automating interactive terminal applications. Its permissive ISC license, low install friction, and zero known vulnerabilities make it safe to adopt. The aging maintenance status (992 days since last release) reflects maturity rather than abandonment—the codebase is production-stable and actively maintained. Best suited for Unix-like systems; Windows support is partial. [View on SkillFed](https://skillfed.io/packages/pexpect) · [View on PyPI](https://pypi.org/project/pexpect/)