I wrote and donated to Guido a 'pty' module, allowing you to open a pty with
all the characteristics you want. On top of this it is relatively easy to
write an 'expect' like module, I donated some sample python code that
implements record and playback, with editing capabilities, to Guido as well
(although it probably can use some rewriting).
Guido had trouble running this on his SGI machine (no surprise, since pty
code is inherently machine specific, or buggy), but I'm sure that could be
easily fixed if somebody would spent some time on it.
-Jaap-