Python IDLE模式下采用multiprocessing 子进程无法输出

参考资料:http://stackoverflow.com/questions/2774585/child-processes-created-with-python-multiprocessing-module-wont-print

Well, IDLE is a strange thing. In order to "capture" everything what you write using print statements orsys.stdout.write, IDLE "overrides" sys.stdout and replaces it with an object that passes everything back to IDLE so it can print it. I guess when you are starting a new process from multiprocessing, this hackery is not inherited by the child process, therefore you don't see anything in IDLE. But I'm just guessing here, I don't have a Windows machine at the moment to check it. – Tamás May 6 '10 at 9:10

也就是说由于Windows安全机制以及IDLE设计的问题,这个没办法搞定,只能在命令行模式下运行正常。

原文地址:https://www.cnblogs.com/kanone/p/2598822.html