A Python extension for Expect.

The current version is 1.8.3.

News: The e-mail address of the author has changed to arcege@gmail.com.

Note: The current version of Expect (5.32) is not compatible with ExpectPy 1.8.x. You will need to download and compile Expect 5.30 (compatible with Tcl 8.0.x). I am currently working on the compatiblity issues with Expect 5.31 and 5.32.

ExpectPy 1.8.3 is a patch to fix bug (#121064) incompatibilities with Python 2.0's new regular expression engine.

News: Nov 5, 2000: I have created a beta release of ExpectPy 1.9, which now supports Python 2.0, Expect 5.31/5.32 and Tcl 8.2.

What is it?

This is an extension for a Python-feel to the Expect library. It was inspired by the 1995 expy module, which had a decidedly Tcl feel to it.

How is it different from other expect modules?

Other expect modules are based either on a C extension using Don Libes' Expect library, or on various Python-based event loops.

ExpectPy is based on Don Libes' Expect library as well, but incorporates a builtin C type with methods as well as support for Perl-Compatible Regular Expressions [1]. The complete module is written in C, taking advantage of the faster processing time.


The module's contents


Download ExpectPy.

Example code

I've included one of the test programs as an example. It is meant to show the relationship between spawn, expect and send using ExpectPy.

SourceForge Logo
The project is now hosted on SourceForge.

1. There is a known bug with ExpectPy's use of PCRE support and with the Tcl library.