Ned Deily added the comment:

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."

----------
resolution:  -> third party
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24573>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to