Contents

pexpect 4.9.0

0

Pexpect allows easy control of interactive console applications.

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.

Stars: 2600, Watchers: 2600, Forks: 476, Open Issues: 159

The pexpect/pexpect repo was created 11 years ago and the last code push was 1 months ago.
The project is very popular with an impressive 2600 github stars!

How to Install pexpect

You can install pexpect using pip

pip install pexpect

or add it to a project with poetry

poetry add pexpect

Package Details

Author
Noah Spurrier; Thomas Kluyver; Jeff Quast
License
ISC license
Homepage
https://pexpect.readthedocs.io/
PyPi:
https://pypi.org/project/pexpect/
Documentation:
https://pexpect.readthedocs.io/
GitHub Repo:
https://github.com/pexpect/pexpect

Classifiers

  • Software Development
  • Software Development/Libraries/Python Modules
  • Software Development/Quality Assurance
  • Software Development/Testing
  • System
  • System/Archiving/Packaging
  • System/Installation/Setup
  • System/Shells
  • System/Software Distribution
  • Terminals
No  pexpect  pypi packages just yet.

Errors

A list of common pexpect errors.

Code Examples

Here are some pexpect code examples and snippets.

GitHub Issues

The pexpect package has 159 open issues on GitHub

  • Not able to erase from input buffer when the line wraps
  • Pexpect Infinite timeout.
  • All missing close method to PopenSpawn class
  • Protect log writer from encoded bytestrings

See more issues on GitHub