Problem with multiprocessing

tleeuwenburg at tleeuwenburg at
Wed Sep 2 08:15:14 CEST 2009

I have a problem using multiprocessing in a simple way. I created a
file,, with the following contents:

import multiprocessing as mp

p = mp.Pool(5)

def f(x):
  return x * x

print map(f, [1,2,3,4,5])
print, [1,2,3,4,5])


I'm using 2.6 r26:66713, so not quite bleeding edge.

If I run 'python2.6' I get errors of exactly the kind
mentioned on for when multiprocessing is run using the
interactive interpreter. However, I'm obviously *not* running the
interactive interpreter.

Any suggestions?

More information about the Python-list mailing list