I'm trying to teach myself the basics of multiprocessing. As such, I found this example and decided to test it.
import multiprocessing
def worker():
"""worker function"""
print 'Worker'
return
if __name__ == '__main__':
jobs = []
for i in range(5):
p = multiprocessing.Process(target=worker)
jobs.append(p)
p.start()
p.join()
It works in the python IDLE, but eventually I need to run code in the IDE for a program called vizard. However, when I do so I get this error:
Traceback (most recent call last): File "", line 11, in IOError: [Errno 2] No such file or directory: u'C:\Users\dbak\Documents\from multiprocessing.forking import main; main()'
It seems like the IDE is looking for forking.py, but I'm unsure as to how I can 'help' it find it. I did put the multiprocessing folder in the same folder the program saved in, but I found that this is still flawed. Does anyone know how I might resolve this error?