Skip to main content

Pexpect allows easy control of interactive console applications.

Project 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 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. Unlike other Expect-like modules for Python, Pexpect does not require TCL or Expect nor does it require C extensions to be compiled. It should work on any platform that supports the standard Python pty module. The Pexpect interface was designed to be easy to use.

Release history Release notifications

History Node

4.5.0

History Node

4.4.0

History Node

4.3.1

History Node

4.3.0

History Node

4.2.1

History Node

4.2.0

History Node

4.1.0

History Node

4.0.1

History Node

4.0

History Node

3.3

This version
History Node

3.2

History Node

3.1

History Node

3.0

History Node

2.4

History Node

2.01

History Node

0.97

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pexpect-3.2.tar.gz (131.1 kB) Copy SHA256 hash SHA256 Source None Apr 15, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page