I am trying to use multiprocessing module in python 2.7 to create a gui with wxpython that calls a separate module in a process that will graph things with matplotlib. However Everytime it calls that module, the gui instead just opens a copy of inself. Next I have tried using the multiprocessing module in a simple example. In the IDLE it appears to start the processes fine, but the processes don't actually run. When I run the code from the command line a attributeerror is raised, yet the code works fine when I switch all multiproccessing.Process to threading.Thread
Heres the command line code: http://imgur.com/QuCUWRD
I've tested this module before and it seemed to have worked, so I am probably just doing something silly, however I can't figure out my error at all!
EDIT:
In my GUI changing the line from
queue_thread = multiprocessing.Process(
target=simple_queue_model.main_func, args = (self.inputs,))
to:
queue_thread = multiprocessing.Process(
target=simple_queue_model.main_func(self.inputs))
Causes the process to be called, however the main GUI window freezes until the process finishes running, and a new gui window is opened again which I don't understand.
EDIT 2:
the previous change just causes my GUI to call main_func no as a separate process. The line queue_thread.start() is what causes a new GUI to spawn, so overall this module isnt working at all for me