Home Download Buy Blog Forum Support

Realtime showing of stdout and stderror

Realtime showing of stdout and stderror

Postby ahbrown42 on Sat Nov 05, 2011 8:33 pm

I am evaluating Sublime and I was curious if there was a way to print out the stdout as it is happening. So this simple test:

for i in 0..10 do
puts "Hello #{i}\n"
sleep(1)
end

Textmate for instance displays the out as it is happening. Is there a way to do this? Is this feature in the queue if not?

Thanks
ahbrown42
 
Posts: 9
Joined: Sat Nov 05, 2011 8:30 pm

Re: Realtime showing of stdout and stderror

Postby ahbrown42 on Mon Nov 07, 2011 3:57 pm

Looked at Groovy and this snippet works oddly:

(1..10).each {
println "Hello $it"
sleep 1000
}

So with Ruby, it is waiting till the code has completed execution, with Groovy, it appears to be showing the messages as they happen.

Odd, I would think the opposite..
ahbrown42
 
Posts: 9
Joined: Sat Nov 05, 2011 8:30 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 11 guests