Can't flush I know why, but no fix

I figured out why it won’t work. i’m using 1.8’s open_uri to retrieve the url with open(url). as soon as this executes everything stops until it downloads the whole file! it isn’t a real IO. blah! that stinks. not i wonder if net/http and net/ftp do the same since that’s what oprn_uri is based on. if so then means i might have to get down to the socket level just to do a progess reported download. frig’n wonderful!

If anyone knows of a better way, or a code snippet i can steal, Please let me know.

Thanks,
-t0

Hi tO,

T. Onoma wrote:

I figured out why it won’t work. i’m using 1.8’s open_uri to retrieve the url with open(url). as soon as this executes everything stops until it downloads the whole file! it isn’t a real IO. blah! that stinks. not i wonder if net/http and net/ftp do the same since that’s what oprn_uri is based on. if so then means i might have to get down to the socket level just to do a progess reported download. frig’n wonderful!

If anyone knows of a better way, or a code snippet i can steal, Please let me know.

Sorry, I don’t know of any code snippets you could use as a starting point.

However, it might be worthwhile modifying open_uri to allow the asynchronous download and progress notification you want, and then submit a patch, so this can end up in the core code.

Cheers,

Harry O.

net/ftp allows you to download a file a bit at a time. Dunno about
net/http.

Gavin

···

On Friday, November 14, 2003, 2:15:18 PM, T. wrote:

I figured out why it won’t work. i’m using 1.8’s open_uri to
retrieve the url with open(url). as soon as this executes everything
stops until it downloads the whole file! it isn’t a real IO. blah!
that stinks. not i wonder if net/http and net/ftp do the same since
that’s what oprn_uri is based on. if so then means i might have to
get down to the socket level just to do a progess reported download.
frig’n wonderful!

If anyone knows of a better way, or a code snippet i can steal, Please let me know.