On Feb 13, 8:09 am, NOSPAM plz <[EMAIL PROTECTED]> wrote: > 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
That's because urllib.urlopen() is not a low enough level function to allow what you want, it will simply open the . Take a look inside of urllib.py and maybe you'll find a way to subclass the urllopen() function to do what you want. Cheers, Jordan -- http://mail.python.org/mailman/listinfo/python-list