pexpect 4.9.0


pip install pexpect

  Latest version

Released: Nov 25, 2023


Meta
Author: Noah Spurrier; Thomas Kluyver; Jeff Quast

Classifiers

Development Status
  • 5 - Production/Stable

Environment
  • Console

Intended Audience
  • Developers
  • System Administrators

License
  • OSI Approved :: ISC License (ISCL)

Operating System
  • POSIX
  • MacOS :: MacOS X

Programming Language
  • Python
  • Python :: 2.7
  • Python :: 3

Topic
  • 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

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.

Wheel compatibility matrix

Platform Python 2 Python 3
any

Files in release

Extras: None
Dependencies:
ptyprocess (>=0.5)