Pexpect is a Pure Python Expect-like module
Pexpect makes Python a better tool for controlling other applications.
Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Pexpect is a pure Python module for spawning child applications; controllingthem; and responding to expected patterns in their output. Pexpect works likeDon Libes' Expect. Pexpect allows your script to spawn a child application andcontrol 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 duplicatingsoftware package installations on different servers. It can be used forautomated software testing. Pexpect is in the spirit of Don Libes' Expect, butPexpect is pure Python.
The main features of Pexpect require the pty module in the Python standardlibrary, which is only available on Unix-like systems. Some features—waitingfor patterns from file descriptors or subprocesses—are also available onWindows.
If you want to work with the development version of the source code then pleaseread the DEVELOPERS.rst document in the root of the source code tree.
Free, open source, and all that good stuff.
You can install Pexpect using pip:
PEXPECT LICENSE:
This license is approved by the OSI and FSF as GPL-compatible.