Controlling an external program with Python

Grant Edwards ge at nowhere.none
Fri Jun 30 11:08:42 EDT 2000


In article <395C73E9.839ABEA6 at hursley.ibm.com>, Paul Duffin wrote:
>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.

Yea, the whole stdout buffering thing can be a headache.

-- 
Grant Edwards                   grante             Yow!  .. If I cover this
                                  at               entire WALL with MAZOLA,
                               visi.com            wdo I have to give my AGENT
                                                   ten per cent??



More information about the Python-list mailing list