Re: [Wtr-general] Redirection of standard output

2007-06-26 Thread Lennart Borgman (gmail)
Bret Pettichord wrote: Ah, good call. Another way to cure it might be to disable buffering for $stdout completely, with: $stdout.sync = true Thanks. I looked for the syntax for that. I saw something like IO#sync = true That did not seem to work. Has it changed? Actually

Re: [Wtr-general] Redirection of standard output

2007-06-26 Thread Bret Pettichord
Lennart Borgman (gmail) wrote: Actually IO#sync means that you should call the sync method on an object that belongs to the IO class. It does not represent executable Ruby code. In your case it means to do $stdout.sync, as originally suggested. Thanks, I had no idea of that. Is that

Re: [Wtr-general] Redirection of standard output

2007-06-26 Thread Lennart Borgman (gmail)
Bret Pettichord wrote: Lennart Borgman (gmail) wrote: Actually IO#sync means that you should call the sync method on an object that belongs to the IO class. It does not represent executable Ruby code. In your case it means to do $stdout.sync, as originally suggested. Thanks, I had no

Re: [Wtr-general] Redirection of standard output

2007-06-26 Thread Bret Pettichord
Lennart Borgman (gmail) wrote: Bret Pettichord wrote: It is a Ruby-specific meta language. It is often used in rdoc. I've seen this lead to lots of confusion. I would express this idea (IO#sync) thus: io.sync = true And the reader would then have to understand that io was an

Re: [Wtr-general] Redirection of standard output

2007-06-26 Thread Lennart Borgman (gmail)
Bret Pettichord wrote: Lennart Borgman (gmail) wrote: Bret Pettichord wrote: It is a Ruby-specific meta language. It is often used in rdoc. I've seen this lead to lots of confusion. I would express this idea (IO#sync) thus: io.sync = true And the reader would then have to

[Wtr-general] Redirection of standard output

2007-06-25 Thread Lennart Borgman (gmail)
This is really a ruby question, but it is probably of interest to people doing simple testing so I try asking it here. I just wrote my first testing script with Watir. I want to test a web server performance so I want the script to run for long time, saving output to a log file. So after

Re: [Wtr-general] Redirection of standard output

2007-06-25 Thread Bill Agee
watir-check.rb 21 | tee watir-check.tmp I am using Windows XP so this is run in cmd.exe, but it normally works with this syntax. (tee.exe is from gnuwin32.) This did not work, the .tmp file is created but is empty and I see nothing in the console window. Does running the command like

Re: [Wtr-general] Redirection of standard output

2007-06-25 Thread Lennart Borgman (gmail)
Bill Agee wrote: watir-check.rb 21 | tee watir-check.tmp I am using Windows XP so this is run in cmd.exe, but it normally works with this syntax. (tee.exe is from gnuwin32.) This did not work, the .tmp file is created but is empty and I see nothing in the console window. Hi Bill, Does

Re: [Wtr-general] Redirection of standard output

2007-06-25 Thread Lennart Borgman (gmail)
Bill Agee wrote: watir-check.rb 21 | tee watir-check.tmp I am using Windows XP so this is run in cmd.exe, but it normally works with this syntax. (tee.exe is from gnuwin32.) This did not work, the .tmp file is created but is empty and I see nothing in the console window. Does running

Re: [Wtr-general] Redirection of standard output

2007-06-25 Thread Lennart Borgman (gmail)
Lennart Borgman (gmail) wrote: Bill Agee wrote: watir-check.rb 21 | tee watir-check.tmp I am using Windows XP so this is run in cmd.exe, but it normally works with this syntax. (tee.exe is from gnuwin32.) This did not work, the .tmp file is created but is empty and I see nothing in the

Re: [Wtr-general] Redirection of standard output

2007-06-25 Thread Bill Agee
I think I understand what is happening now. It is buffering. I did not notice, since I let the program ran for long time in a loop and interrupted it later (with Control-C). After some googling I inserted STDOUT.flush and this cured the problem. Ah, good call. Another way to cure it

Re: [Wtr-general] Redirection of standard output

2007-06-25 Thread Lennart Borgman (gmail)
Bill Agee wrote: I think I understand what is happening now. It is buffering. I did not notice, since I let the program ran for long time in a loop and interrupted it later (with Control-C). After some googling I inserted STDOUT.flush and this cured the problem. Ah, good call.

Re: [Wtr-general] Redirection of standard output

2007-06-25 Thread Bret Pettichord
Ah, good call. Another way to cure it might be to disable buffering for $stdout completely, with: $stdout.sync = true Thanks. I looked for the syntax for that. I saw something like IO#sync = true That did not seem to work. Has it changed? Actually IO#sync means that you should