> If you want to make full use of multiple processors using pure python
> code you'll have to use multiple processes.

This is absolutely true, but in practice it is a little more
complicated.  If you can factor your algorithm so that each process
can be run completely separately, with no interprocess communication,
then just using multiple processes will work fine.  But once you need
your processes to communicate in any way using sockets, there is
another critical requirement to make the multi-process solution work
in practice.  You will absolutely need to use non-blocking sockets and
the best way to do this in python is using Twisted.

Now a bit of self-promotion....As a part of the IPython project we
have been implementing an architecture that allows you to do parallel
and distribted computing interactively in python/Ipython.  This
infrastructure solves many of the basic problems you will run into we
regularly use it to take advantage of multi-core and multi-CPU
hardware.  For details, see:

http://ipython.scipy.org/moin/Parallel_Computing

Cheers,

Brian
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to