Steven> Is this "Expect(1)" the tcl application, ...
Yes it is! Actually not the complete Expect application but rather the
My idea is(/was?!) this: Why write yet a "chat2" (perl users knows
what I mean) in python when there is expect, tested and ready for
linking with your favorite language. (Python :-) Well this is one of
the features of python that it is easy to create new modules, right!?
However reality strikes back:
* The expect-library seems to be just that little but irritating
dependent on Tcl stuff. So there goes the just simple linking idea.
* You would also want to have multiple arguments and python doesn't
allow this for modules so you would have to write some interface
glue both in python and C to interface the expect-lib functions.
* You would want the python expect module to use the regular
expressions from the regexp-module. This would reduce further the
amount of code reused from the expect-lib.
* The expect-lib level doesn't have the wanted/needed (by me)
"interact" feature. (Hands over interaction to the users in a
>>>>> Then jaap said:
jaap> I wrote and donated to Guido a 'pty' module, allowing you to
jaap> open a pty with all the characteristics you want. On top of
jaap> this it is relatively easy to write an 'expect' like module,
Considering what I wrote above this would probably be an interesting
way to go since there are quite a few lines of code needed to be
written in either case. I'm afraid however that it is likely to be a
If someone will try this I would suggest keeping/adding the following
features that I like from expect:
* the session log-file which makes debugging a lot easier, and
* interact, (very important difference compared to chat2) which makes
it possible to hand over interaction to the users in a transparent