On Wed, 07 May 2003 20:43:52 +0900, nobu.nokad wrote:

> At Wed, 7 May 2003 19:36:33 +0900,
> Simon Strandgaard wrote:
>> >> Capturing output to a File works fine.. But not to StringIO, Why ???
>> > 
>> > StringIO works only in a process, not across processes.
>> 
>> Do you have any suggestions for an alternative to StringIO ?
> 
> Fundamentaly, StringIO works in the process'es memory space, so
> it's not accessible from child processes.  Use pipe with popen
> as Brian mentioned in [ruby-talk:70798], or popen3.

popen3 looks very interesting... transfering control in a
grand-child-process outputting to somewhere else..
I must admit I don't quite understand exactly what is going on. 
This is propably something like popen3 which I need.


Still.. this doesn't solve my problem.

Story of my problem:
I am developing a programmers-editor for both GUI and TTY.
It has a ruby backend and some C++ frontends.
Its suppose to be extremely customizable: You can load you own 
ruby-scripts into the backend.
http://metaeditor.sf.net/


Goal:
Users of the editor should be able to run their favoite 
ruby scripts from the within the editor-backend.


Now the problem:
if a User does a "system" or "backquote" call the output will
not be transfered correctly to the execute-buffer.
This will especialy cause problems with a Ncurses-frontend
for the editor.


How can I capture this output ?


--
Simon Strandgaard