[Tutor] Popen and Prompting

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Wed Aug 31 21:06:22 CEST 2005

On Tue, 30 Aug 2005, Faulconer, Steven M. wrote:

> Been digging through the web and the archives for the tutor list and
> can't seem to locate an answer to my question. It is probably out there,
> but my searching skills are failing me. I recently wrote a GUI for
> several command line programs using Tkinter. Everything is working quite
> well, until I ran into one program that actually prompts for some input.

Hi Steven,

This is a common problem.  The Unix folks have traditionally used a
program called "Expect" to automate talking with interactive external
processes. There's a Python equivalent to Expect: take a look at the
'pexpect' module.  Here you go:


The documentation on that page has a few examples that should help you get
started.  Best of wishes to you!

More information about the Tutor mailing list