This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients ned.deily, r.david.murray, ronaldoussoren, tkessler
Date 2015-07-06.19:32:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1436211164.75.0.586353708157.issue24573@psf.upfronthosting.co.za>
In-reply-to
Content
A web search will find multiple hits for problems with using Tk (and Tkinter) with multiprocess on OS X and elsewhere.  On OS X, there is a well-known and documented restriction that impacts Tk-based apps:

"When launching separate processes using the fork function, you must always follow a call to fork with a call to exec or a similar function. Applications that depend on the Core Foundation, Cocoa, or Core Data frameworks (either explicitly or implicitly) must make a subsequent call to an exec function or those frameworks may behave improperly."

https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Multithreading/AboutThreads/AboutThreads.html

For a specific example of problems using tkinter and multiprocessing see:
http://stackoverflow.com/questions/23599087/multiprocessing-python-core-foundation-error

Some suggest that you *might* be able to get things to work as long as you defer importing tkinter (and, thus, initializing Tcl and Tk) until after all of the processes are created.  But, in general, it's not a good idea to separate tkinter calls across multiple processes.  See Bryan Oakley's advice in the above SO link:

"You'll need to keep all GUI code in the master process, and have your other process communicate with it via a queue."
History
Date User Action Args
2015-07-06 19:32:44ned.deilysetrecipients: + ned.deily, ronaldoussoren, r.david.murray, tkessler
2015-07-06 19:32:44ned.deilysetmessageid: <1436211164.75.0.586353708157.issue24573@psf.upfronthosting.co.za>
2015-07-06 19:32:44ned.deilylinkissue24573 messages
2015-07-06 19:32:44ned.deilycreate