From: Stefano Crocco Date: 2008-05-31T21:46:43+09:00 Subject: Re: getting standard error and output from ruby script in real time On Friday 30 May 2008, Xeno Campanoli wrote: > Stefano Crocco wrote: > > I'm trying to write an editor for ruby in ruby using the KDE4 bindings > > for ruby and I'm facing a problem which I don't know whether is caused by > > ruby or by KDE. I want my editor to be able to run a ruby script and > > display both the error messages and the normal output in a window. The > > problem is that all the text sent to the standard output seems to be > > received together from my application, and so does the text sent to > > standard error, even if the two are mixed. For example, when I run the > > following script > > > > 5.times do |i| > > warn "Warning #{i}" > > puts i > > end > > STDERR.puts > puts is stdout. I know that puts writes on standard output, this is what I want it to do. It's warn which outputs to standard error. Stefano