From: Rob Pierry Date: 2007-10-05T23:04:33+09:00 Subject: Re: Force IRB into interactive mode (to display prompt)? Pit Capitain wrote: > 2007/10/4, Rob Pierry : >> I want to have a pane in my GUI that works like irb. Basically embed it >> into a windows app. I'm starting a process in the background for irb >> and I want to pass input to it and read output from it. It's >> interactive, it's just indirectly interactive so irb doesn't print the >> prompt and dies immediately on error instead of printing the message and >> staying alive. > > Rob, you could look at fxri (http://rubyforge.org/projects/fxri) how > they do it. It's a part of the one-click-installer. > > Regards, > Pit I've looked at fxri and its UI is launched from the same ruby process that is already running, so it can manipulate the IRB class directly. FXRI has its own custom IRB Inputmethod and manages the printing of the prompt itself. For various reasons I need to start the ruby process separately from my main app (which isn't in ruby). I could probably write some ruby code that I executed instead of just running IRB that managed the input and prompting, but I was hoping there was an easier way that just involved setting some flags for IRB or something so it behaved like it was in interactive mode. Thanks. -- Posted via http://www.ruby-forum.com/.