Alan G Isaac wrote: [snip] > On 3/30/2009 3:37 AM Eric Brunel apparently wrote: >> The Tk instance is registered in a hidden variable in the Tkinter module. When >> you don't specify a master, it'll use the latest created Tk instance one by >> default. BTW, the latest should be the only one: it is quite unsafe to create >> several Tk instances in the same application. > > I have no desire to do this, but might you pin down "unsafe"?
It is not supposed to be unsafe at tcl level, as it supports several interpreters side by side in the same application. It is unsafe at user level, precisely because creating a StringVar might put it in the interpreter you don't want, leading to weird errors and unexpected results. So you *can* use several Tk instances in the same application, but then you really should specify a master for absolutely everything, or you'll get bitten at some point. > Thanks! > Alan Isaac YW. HTH. - Eric - -- http://mail.python.org/mailman/listinfo/python-list