[Tutor] Can subprocess run functions ?

wesley chun wescpy at gmail.com
Thu Jan 8 01:36:38 CET 2009


> Anyhow, subprocess is working -- but I wonder if there is a way I can
> send the entire *function* into its own subprocess ?


this has been a highly-desired feature for quite awhile.

starting in 2.6, you can use the new multiprocessing module
(originally called pyprocessing):
http://docs.python.org/library/multiprocessing.html

there is a backport to 2.4 and 2.5 here:
http://pypi.python.org/pypi/multiprocessing/2.6.0.2

there are similar packages called pypar and pprocess:
http://datamining.anu.edu.au/~ole/pypar/
http://www.boddie.org.uk/python/pprocess.html

hope this helps!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
"Python Fundamentals", Prentice Hall, (c)2009
    http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com


More information about the Tutor mailing list