Threads with Python?

Aahz aahz at pythoncraft.com
Tue Dec 31 00:11:32 EST 2002


In article <3E10FBBD.5D3FC884 at engcorp.com>,
Peter Hansen  <peter at engcorp.com> wrote:
>Fernando wrote:
>> 
>> I have a small python app that would benefit from using threads (it
>> fetches info from several web servers). Does python support this? I
>> checked my copy of Learning Python, but it doesn't mention it...
>
>You might consider, in addition the other responses pointing
>you to the standard threading support, looking into how asynchronous
>socket-based applications function.  There is a module called medusa
>(asyncore and asynchat) in the standard library now, in addition to
>a sophisticated framework called Twisted (google can help you here)
>which will let you do what you want *without* threads, with likely
>simpler code and better performance overall (which may or may not
>be an issue for you).  

Note that Twisted is not mutually exclusive with threads:
http://www.twistedmatrix.com/documents/howto/threading
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"There are three kinds of lies: Lies, Damn Lies, and Statistics."  --Disraeli



More information about the Python-list mailing list