urlretrieve() or urlopen() ??

Kyler Laird Kyler at news.Lairds.org
Fri Apr 11 15:23:18 EDT 2003


MCollins at co.seminole.fl.us writes:

>still working on the utility to download log files via http.

>my first solution (which worked) was using urlopen(), reading the logfile
>line by line and writing it to a new file line by line.  this felt a little
>slow when working with 200mb files across an http connection.

>so, i switched to urlretrieve(), thinking that would be faster.  however,
>with urlretrieve() i get a "no buffer space available" error.

Did you consider the urlretrieve(url, filename) form?  Am I
missing some processing that you're doing as you receive the
data?

--kyler




More information about the Python-list mailing list