A Python extension for Expect.

The current version is 1.9.

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

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.