[Python-Dev] Expect in python

David Ascher DavidA@ActiveState.com
Thu, 21 Nov 2002 17:22:31 -0800

Eric S. Raymond wrote:

> Has anyone else here looked at Pexpect?  It's a pure-Python module that
> uses ptys to support mmost of the capability of Tcl expect.
> 	http://pexpect.sourceforge.net/
> This is an 0.94 beta, but the author appears to know what he is doing, and
> it would be an excellent boost to Python's capabilities for administrative
> scripting.  Among other things, it would subsume most of what Tcl is actually
> used for.
> I'm thinking this is a very strong candidate to enter the Python library when
> it reaches 1.0 level.  Comments?

The thing that would make a true 'killer app' as compared to Tcl is if it worked 
well on Windows and had a model that extended to a more abstract API (not just 
character streams, which, IIRC, is central to expect).  Given the pty support, 
that seems unlikely.  Too bad.

Have you used pexpect enough to explain why it's good, or is this an 'in 
principle' argument?  I agree that expectish functionality would be nice. 
Something that I could grow into a Windows/not-just-pty's model would be even nicer.