Q: socket error in multi-threaded urlopen

Jonathan Feinberg jdf at pobox.com
Tue May 8 15:48:35 EDT 2001


"Seung-won Hwang" <shwang5 at students.uiuc.edu> writes:

> I'm trying to call urlopen using multiple threads and it gives me
> the following errors. I'm experimenting if I can call hundreds of
> 'urlopen' calls simulataneously. Is there any way to get around this
> 'too many open files' problem in doing so?

You might want to look into the asyncore module, which provides for
socket multiplexing in one process.  Of course, there is no way to
combine the library code from urlopen with the multiplexing code from
asyncore, so you'll have to roll your own protocol handlers.

-- 
Jonathan Feinberg   jdf at pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf



More information about the Python-list mailing list