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 a 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.
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size pexpect-4.7.0-py2.py3-none-any.whl (58.4 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View hashes|
|Filename, size pexpect-4.7.0.tar.gz (153.7 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for pexpect-4.7.0-py2.py3-none-any.whl