[issue5527] multiprocessing won't work with Tkinter (under Linux)

Jani Hakala report at bugs.python.org
Thu Apr 2 09:25:48 CEST 2009


Jani Hakala <jahakala at iki.fi> added the comment:

The script tk_test.py produces the window with one button after one
removes the line 'from Tkinter import *' and adds line 'from Tkinter
import Tk, Button' inside Panel.draw() as a first line.

So importing Tkinter after the fork seems to solve the problem.
Importing it before the fork only makes the parent process consume more
memory anyway. Maybe importing the Tkinter (and thus _tkinter) causes
some initialisation to be done. If this should be done only in the
process that utilises Tkinter there might be problems like this.

----------
components: +Tkinter
nosy: +jahakala

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5527>
_______________________________________


More information about the Python-bugs-list mailing list