[Python-Dev] new module proposal: expect

Guido van Rossum guido at python.org
Thu Dec 11 19:59:22 EST 2003

> It is sometimes necessary to interact with other programs, or users, as
> a user would via a command line interface. This is especially common in
> QA environments. A program called "expect", which is based on the Tcl
> language, has commonly been used for this. But that program is, well,
> not Python. ;-) Having a general purpose "expect" module for Python
> means that Python could be used out-of-the-box for the same tasks that
> the older "expect" program is used for. The attached expect.py module
> provides most of the core functionality of the original expect tool.
> Other functionality from the "expect" tool is duplicated in other Python
> modules.
> It is hoped that this will enable non-Python users to easily replace any
> "expect" installations they have with Python. Thus, growing the Python
> market. Having this functionality as part of the core distribution would
> facilitate that.

Good, this is the kind of module that would make the Python standard
library more useful.  However, I've seen many implementations of this
before.  Before yours gets accepted into the standard library, you
have to convince us that your version is "best of breed".  That's been
done before: the logging package and the optparse module came about
this way.  But you have to do the research to compare your version
with others.  I recommend that you take this to c.l.py first.

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list