Multiple threaded download streams?

gjzusenet at gmail.com gjzusenet at gmail.com
Sat Feb 25 06:41:05 EST 2006


Hello.
Though Python supports threading, I think it is limited to python code
- as soon as you issue a command that uses an external (C?) module, all
of your python threads hang until this command returns.
Is that true?
I'm using urllib2 to download many files, and I have a double problem:
1. downloading all of them is painfully slow since it's serial - one
has to finish before the next request gets sent.
2. my GUI becomes non responsive during the downloads - major problem!

Is there any way to work around that?
I want to run multiple download streams, in parallel, and while keeping
my program responsive.
Are there alternative modules that I can use for that?

Any ideas?
Thanks a lot!




More information about the Python-list mailing list