Help with Python Multiprocessing

Gary Herron gary.herron at
Thu Nov 13 20:12:22 CET 2014

On 11/13/2014 10:07 AM, Anurag wrote:
> I am having trouble understanding the Multiprocessing module.
> I need to run three different files 'Worker1' , 'Worker2', 'Worker3' all at once. Currently I am doing this :
> from multiprocessing import Process
> import
> import
> import
> p1 = Process(
> p1.start()
> p2 = Process(
> p2.start()
> p3 = Process(
> p3.start()
> But this will only start the 'Worker1'. How do I execute all the three files at once?
> Thanks

I doubt that is your actual code.  Python imports do not include .py 
extension.  Please show us your actual code.  (Use cut and paste 
please.)  And then take the time to tell us how you determine only the 
first is started.  Then we can probably help.

As an aside: To be sure, one could make the above imports work by having 
files named and in a directory named Worker1 (and the 
same for directories Worker2 and Worker3).   I think it's more likely 
that you miss-typed the above code.

Gary Herron

More information about the Python-list mailing list