Tal Einat <[EMAIL PROTECTED]> added the comment: First of all, the multiprocessing module doesn't work fully in an interactive shell.
>From the Python2.6 docs: "Note Functionality within this package requires that the __main__ method be importable by the children. This is covered in Programming guidelines however it is worth pointing out here. This means that some examples, such as the multiprocessing.Pool examples will not work in the interactive interpreter." And later on that same page (under Programming Guidelines -> Windows): "Make sure that the main module can be safely imported by a new Python interpreter without causing unintended side effects (such a starting a new process)." This is probably why IDLE is acting up for you. I would be surprised if using the multiprocessing module will work well in IDLE either with or without a sub-process. As per the patch, someone should just work up an updated one with all of the insight gained in the last several years (!) regarding this. It should just do two things: 1) remove the use of the SO_REUSEADDR flag in the sub-process spawning code -- see http://bugs.python.org/issue1201569 2) pass zero as the argument for the port number, which instructs the underlying socket library to select an available port, and later retrieve the selected port from the socket object -- see http://mail.python.org/pipermail/idle-dev/2008-June/002687.html The other changes in my original patch, while they do work, are unnecessarily complex and make it much harder to get the patch accepted. They should also not be significant if the spawning delays are fixed. If you'd like to work up such a patch and get it reviewed and committed, please be my guest! I will help you in any way I can if you take this up. Otherwise I guess it will wait until I find the time and energy... _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1529142> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com