From: Matthew Williams Date: 2006-11-17T05:32:32+09:00 Subject: Re: testing whether a process has completed.. > I suppose > one might look at the output of ps and see if it talks about IO, but > then you don't know if it is scribbling exciting things on the disk > or doing the IO that connects to you. I just thought this must be possible because the command prompt knows that input is expected because it allows characters to be entered from the keyboard, and when it is executing it blocks all input.. > > Well, if you are invoking it as above, you have access to the source > so you can get it to prompt you for input. OK > > There are exits North, East, and West. > OK> > > But you have to *know* that the "OK> " is a prompt. > require 'semiotics' # :-) > Actually, apart from Tcl escaping, it's mostly the interaction > that is the time consuming part of writing Expect scripts. You've lost me here.. i'm not a very experienced user of Ruby and am not sure what 'Tcl escaping' or 'expect scripts' are. Could you please explain? Couldn't I just override the 'gets' method in the Ruby program and get the new method to output something like 'WRITE', and then the Rails program could listen for this command, and when it gets it write to the program? Is 'gets' the only method that prompts input from the user? -- Posted via http://www.ruby-forum.com/.