[Python-Dev] Cannot use multiprocessing and zip together on windows
python.leojay at gmail.com
Wed Dec 21 09:50:46 CET 2011
I posted this several days ago in python mailing list but got no response
and I think it might be a bug, so I post it here. Apologize if it's
I have a file p.zip, there is a __main__.py in it, and the content of
from multiprocessing import Process
print 'in f, pid:', os.getpid()
if __name__ == '__main__':
print 'pid:', os.getpid()
p = Process(target=f)
On linux, I can get expected result for running "python p.zip"
But on windows xp, I got:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\python27\lib\multiprocessing\forking.py", line 346, in main
File "C:\python27\lib\multiprocessing\forking.py", line 454, in prepare
assert main_name not in sys.modules, main_name
It seems that the situation described here is similar:
But the patch doesn't work for me.
Anybody knows how to fix this?
More information about the Python-Dev