<br><div><span class="gmail_quote">On 4/24/06, <b class="gmail_sendername">Jeff Epler</b> <<a href="mailto:jepler@unpythonic.net">jepler@unpythonic.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I just read the manpage for Tk_Init(3) (fc4 package tk-8.4.9-3) and it<br>does not say that Tk_Init() may only be called once. While this doesn't<br>mean Python shouldn't work around it, I think the behavior should be<br>
considered a bug in Tk, not _tkinter.</blockquote><div><br>FWIW, the Tk_Init manpage says "the Tk interpreter should not already be loaded", and it then goes on to say that if Tk_Init fails to *initialize* the interpreter, an error is returned. So it's unclear to me whether Tk_Init really "loads the interpreter", and whether it unloads after an error occurs (apparently not, I'd say ;)
<br><br><a href="http://www.tcl.tk/man/tcl8.4/TkLib/Tk_Init.htm">http://www.tcl.tk/man/tcl8.4/TkLib/Tk_Init.htm</a><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
However, on this system, I couldn't recreate the problem you reported<br>with either the "using _tkinter directly" instructions, or using this<br>"C" test program:<br><br>#include <tcl.h><br>#include <
tk.h><br><br>int main(void) {<br> Tcl_Interp *trp;<br> unsetenv("DISPLAY");<br> trp = Tcl_CreateInterp();<br> printf("%d\n", Tk_Init(trp));<br> printf("%d\n", Tk_Init(trp));
<br> return 0;<br>}</blockquote><div><br>Yes, this C snippet locks up on my systems, just as the python snippet does.<br></div></div><br>-- <br>Thomas Wouters <<a href="mailto:thomas@python.org">thomas@python.org</a>
><br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!