Controlling an external program with Python

Paul Duffin pduffin at hursley.ibm.com
Fri Jun 30 06:18:17 EDT 2000


Grant Edwards wrote:
> 
> In article <39588741.FB7EB5FE at hursley.ibm.com>, Paul Duffin wrote:
> >Donn Cave wrote:
> >>
> >> Quoth ge at nowhere.none (Grant Edwards):
> >> | Or you can roll your own using the popen2 module.
> >
> >I think that you will find that Expect offers a lot more than a simple
> >pipe to the executable.
> 
> Yes, I know. That's where the "roll-your-own" bit comes in. If
> all you _want_ is a simple pipe to the executable, then expect
> isn't really the right choice.
> 

If all you _want_ is a simple pipe then you may be disappointed if it turns
out that what you _need_ is proper tty support. You are correct that a 
simple pipe is often enough, I was trying to explain that you cannot
roll your own version of Expect using a simple pipe.



More information about the Python-list mailing list