[Tutor] Connecting to interactive program

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Tue Dec 7 23:02:57 CET 2004



On Tue, 7 Dec 2004, Vincent Nijs wrote:

> Has anyone ever tried to send commands to a running interactive python
> session from, say, the command line or another app?

Yes.  This sort of thing can be done through an "expect" script.

    http://expect.nist.gov/

There's a port of expect for Python:

    http://pexpect.sourceforge.net/

Out of curiosity though, do you really need to run Python interactively?



More information about the Tutor mailing list