multiprocessing Pool start multiple GUI

Hi everyone,
I am using multipleprocess module Pool method from the GUI I wrote
using wxPython.
When I step over this command:

pool = Pool(processes=4)
m = pool.map(cmdfunction, cmdStr)

The function will pop out 4 duplicates of the GUI which calls it,
which is not what I want.
I want it to use 4 processes in the console function, which I will
call in cmdfunction.
Is there anything wrong I did here? Any suggestions will be helpful.

Thank you.

Mua

This is far too little information to tell what’s going wrong - could you please post a small runnable example that reproduces the problem?

I use the multiprocessing module from wxPython programs all the time, and it has never started extra GUIs. (This is usually on Mac or Linux, which can use os.fork() to start new processes, but I’ve managed to run some of my code on Windows too, and that didn’t have any problems of this sort.) Any new processes or pools are always started after calling app.MainLoop(), and the functions I’m calling this way never call any wx code.

-Nat

···

On Wed, Sep 7, 2011 at 11:53 AM, mua mms2mms@gmail.com wrote:

I am using multipleprocess module Pool method from the GUI I wrote

using wxPython.

When I step over this command:

pool = Pool(processes=4)

m = pool.map(cmdfunction, cmdStr)

The function will pop out 4 duplicates of the GUI which calls it,

which is not what I want.

I want it to use 4 processes in the console function, which I will

call in cmdfunction.

Is there anything wrong I did here? Any suggestions will be helpful.