Message 243268 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Content
Yes actually it produce no erroe on standalone script. But the script
executes without any outputs. not even for numpy function. I used code
below in script.
import multiprocessing
import numpy
def f(x):
    return x*x

if __name__ = "__main__":
    p= multiprocessing.Pool(5)
    print p.map(numpy.sqrt,[1,2,3,4])
    print p.map(f,[1,2,3,4])
 On May 15, 2015 2:52 PM, "Paul Moore" <report@bugs.python.org> wrote:

>
> Paul Moore added the comment:
>
> Multiprocessing works by firing up additional processes. Those processes
> won't have access to functions defined in the interactive interpreter.
>
> Can you reproduce this problem in a standalone script? I suspect not, but
> if you can please post the script here.
>
> Marking as "not a bug", but I haven't closed it yet in case a script
> reproducing the issue can be provided.
>
> ----------
> nosy: +paul.moore
> resolution:  -> not a bug
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue24202>
> _______________________________________
>