Ruby and popen

Hi, I am a new programmer, very new to ruby. I am creating a windows
front end to rsync, and I am having some issues, I have read alot of the
net and can't seem to find a solution.

Here is the problematic function:

    def rsync_files()
  String command="rsync --verbose --stats --progress -r
--rsh=c:/ruby/bin/ssh" + @filenames + "myuser@myhost.com:/home/myuser"
        rsync = IO.popen(command, "w+")
        inctxt=""
        begin
                print(inctxt)
                @statustextbox.append_text(inxtxt)
                inctxt=rsync.gets
        end while inctxt!=nil
    end

Pretty much it sends the proper rsync command and everything works, but I
dont get any feedback from the program untill rsync finishes it. I figure
that the stdout buffer isnt full so it doesent send any info untill the
program finishes. I can find a way to flush the buffer.

Any help would be great.

--Andrew

$stdout.sync = true

Cheers,

···

In article <63361.66.244.197.22.1087245776.squirrel@mail.infotechdomains.com>, commo@infotechdomains.com wrote:

program finishes. I can find a way to flush the buffer.

--
Csaba

"There's more to life, than books, you know but not much more..."
[The Smiths]
***
If you want to send me a mail, see it in the mailto link at
http://www.renyi.hu/~ekho/egyelore.html