<br><div><span class="gmail_quote">On 4/24/06, <b class="gmail_sendername">Jeff Epler</b> &lt;<a href="mailto:jepler@unpythonic.net">jepler@unpythonic.net</a>&gt; 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.&nbsp;&nbsp;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 &quot;the Tk interpreter should not already be loaded&quot;, 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 &quot;loads the interpreter&quot;, 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 &quot;using _tkinter directly&quot; instructions, or using this<br>&quot;C&quot; test program:<br><br>#include &lt;tcl.h&gt;<br>#include &lt;
tk.h&gt;<br><br>int main(void) {<br>&nbsp;&nbsp;&nbsp;&nbsp;Tcl_Interp *trp;<br>&nbsp;&nbsp;&nbsp;&nbsp;unsetenv(&quot;DISPLAY&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;trp = Tcl_CreateInterp();<br>&nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;%d\n&quot;, Tk_Init(trp));<br>&nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;%d\n&quot;, Tk_Init(trp));
<br>&nbsp;&nbsp;&nbsp;&nbsp;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 &lt;<a href="mailto:thomas@python.org">thomas@python.org</a>
&gt;<br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!