[Python-Dev] Expect in python
Eric S. Raymond
Thu, 21 Nov 2002 20:25:40 -0500
David Ascher <DavidA@ActiveState.com>:
> 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.
Granted, but let's not let (nonexistent) perfection be the enemy of the good.
This module would be very useful to Unix sysadmins and others just as it is,
and the API will be comfortable for anybody familiar with Tcl expect. That's
not a trivial advantage.
> Have you used pexpect enough to explain why it's good, or is this an 'in
> principle' argument?
I'm writing an application using it now, a program to prepare remote
sites for ssh access. There are a lot of fiddly details to this, like
verifying that the permissions on remote directories are correct. Users
shouldn't have to sweat this sort of thing by hand.
It seems to work, so far. It's well documented and the examples are helpful.
> 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.
Agreed. Your chances of this certainly won't be *decreased* if pexpect is
<a href="http://www.tuxedo.org/~esr/">Eric S. Raymond</a>