Download parts not whole file in ones
NOSPAM plz
nospam at riddergarn.dk
Tue Feb 13 08:09:18 EST 2007
Hey,
My problem is, is it possible to download parts of a file while. i think
is it is called threading
My code thats download the whole webpage, and stunds the app while is is
downloading:
-----------CODE-----------
import urllib
# the heavy file to download
f = urllib.urlopen("http://da.wikipedia.org/wiki/Wiki")
# This was supposed to print the file while it downloads
while 1:
print f.read(100)
-----------/CODE-----------
In my example it just download the whole file, and then print it.
Any suggestions?
Regards
Andreas
More information about the Python-list
mailing list