In article <81D093095B1E1A41A575AFDFD1F2F41404A93D / c1plenaexm06.commerceone.com>, "Barnett, Aaron" <aaron.barnett / commerceone.com> wrote: > i did this recently to interact with ispell. i run it twice to make the > whole process quicker, long and irrelevant story... replace ispell with > 'sh'. the trick will be knowing how much output to grab given a line of > output. you dont want to block reading when nothing is coming. my > example is of a rather simple interaction. What I'm trying to do is write a front-end to the ruby debugger. The Open3 stuff someone else pointed me to seems to work for me, but I appreciate your example, since it's close to what I want to do. I agree that determining when the output resulting from a command you've sent to the process has finished is the hard part. I'm trying to use the stuff in expect.rb, but not having a huge amount of success. I can't get it to return when the rdb prompt is output. I can make it timeout, but the problem with that is that executing a single command in the debugger could take an arbitrary amount of time, since it's executing the code that's being debugged. I was doing that at 0400 this morning, so maybe when I get back to it later today it will become obvious what's going on ... I live in hope :-). Thanks again for the example.