Controlling an external program with Python

Thilo Ernst te at first.gmd.de
Thu Jun 29 05:55:39 EDT 2000


Alexandre Ferrieux wrote:

> Paul Duffin wrote:
> >
> > Apparently there is a port of Expect for Python so why not use that
> > rather than try and reimplement it all over again.
> > Expect has over 7 years of development and centuries of testing on many
> > different platforms, do you really want to reproduce that. If so why,
> > what exactly is wrong with Expect.
>
> The same as with TkInter: it needs a full Tcl inside. Again I've got
> next to nothing against Tcl, it's just that the separation of orthogonal
> things is such a natural thing for me.
>
> -Alex

Not all Python Expects are based on Tcl's. The one I use  (by Paul
Sheer  <psheer at obsidian.co.za> is a small "standalone"( i.e. not relying
on  Tcl's or another Expect package being available) C extension with a
thin Python layer above it, and it works for me (on Linux) like a charm.
The nice thing about it is that it has an easy, popen2-like interface.
It more or less does what one would expect popen2 to do, as a naive user.
Thanks, Paul!

- Thilo




More information about the Python-list mailing list