Each instance of Tk
is separate from any other instance of Tk
. It gets its own copy of an underlying tcl interpreter. Two instance of Tk
in the same process means you have two active tcl interpreters.
As a general rule you should only ever have exactly one instance of Tk
, but I suppose if you fully understand how they work, it should be possible to have two or more.
I think this falls into the category of things you shouldn't do until you understand why you shouldn't do them. And once you understand, you won't want to do it.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…