Scripting Telnet

Bob Horvath bob at
Fri Jun 11 03:44:45 CEST 1999

Emile van Sebille wrote:

> Hello all,
> I've accepted a project and I think I can use Python for part of it.
> The project is moving data collected in a warehouse management system
> into a proprietary, legacy CHUI application.  The information is to be
> processed hourly by a cron job under HPUX.  Most of the legacy app
> source code is available, but there are some black boxes in there I
> can't get at.  The app doesn't like standard input redirection, but will
> run in a telnet session.
> My choices appear to be 1) write a utility in the native app's
> environment the mimics the result set of the current app (and I _really_
> don't want to wade through that crap to figure it out); or 2) script the
> input requirements and feed the application while it runs (I've done
> this for smaller projects using VB sendkeys).
> I feel that python ought to be good for this, and I'm hoping you'll
> point me to the appropriate modules to look into or techniques to use.
> I did a little browsing through dejanews and saw a reference to perl's
> expect that looks like it does this kind of work,so maybe there's a
> python tool too?
> Trying-to-get-paid-and-learn-more-python-at-it-ly y'rs,

Well, the tcl based expect is probably the most appropriate tool for such a
thing, but there is a pythonized version(s) of it as well.  The one I can
think of is ExpectPy, (, but
I seem to remember seeing at least one other one.

More information about the Python-list mailing list