From: Bill Kelly Date: 2003-11-14T10:18:06+09:00 Subject: Re: can't flush print when download open-uri Hi, From: "T. Onoma" > > no one responded to this and i still can't get it to work. please help. > let me rephrase very simply: > > downloading file with open_uri and can't flush print to report download progress. > [...] > > > while incoming = remote_file.read(512) > > source_file_io.write(incoming) > > # THIS WON'T THIS PRINT!!!!!!!!!!! > > print "\ca{source_file_io.pos}KB/#{@source_size}KB" > > end Have you tried stdout.sync = true ? --------------------------------------------------------------- IO#sync= ios.sync = aBoolean -> aBoolean ------------------------------------------------------------------------ Sets the ``sync mode'' to true or false. When sync mode is true, all output is immediately flushed to the underlying operating system and is not buffered internally. Returns the new state. See also IO#fsync. f = File.new("testfile") f.sync = true (produces no output) Hope this helps, Bill