[Tutor] Re: running an interactive program from a script

Lee Harr missive at hotmail.com
Fri Jan 9 07:22:18 EST 2004


>I can handle the logic for toggling values and so forth, but I can't
>work out how (or if it's possible)  to get python to interactively
>'drive' another program. I know it would be a horrible hack -- I should
>of course learn C and then fix the original programs -- but it's never
>going to happen and the hack would solve my problems nicely. I've been
>experimenting with the popen2 module, but I can't make it work. Is this
>the right track? Any suggestions?


I expect that will work, or there is also a python expect module ... :o)

http://pexpect.sourceforge.net/

I have used that recently and much prefer it to the tcl expect, but mostly
just because I am much more familiar with python than tcl.

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the Tutor mailing list