[Python-Dev] Tkinter lockups. (original) (raw)

Thomas Wouters thomas at python.org
Mon Apr 24 11:11:27 CEST 2006


On 4/24/06, Jeff Epler <jepler at unpythonic.net> wrote:

I just read the manpage for TkInit(3) (fc4 package tk-8.4.9-3) and it does not say that TkInit() may only be called once. While this doesn't mean Python shouldn't work around it, I think the behavior should be considered a bug in Tk, not tkinter.

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 ;)

http://www.tcl.tk/man/tcl8.4/TkLib/Tk_Init.htm

However, on this system, I couldn't recreate the problem you reported

with either the "using tkinter directly" instructions, or using this "C" test program:

#include <tcl.h> #include <tk.h> int main(void) { TclInterp *trp; unsetenv("DISPLAY"); trp = TclCreateInterp(); printf("%d\n", TkInit(trp)); printf("%d\n", TkInit(trp)); return 0; }

Yes, this C snippet locks up on my systems, just as the python snippet does.

-- Thomas Wouters <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20060424/88b957eb/attachment.html



More information about the Python-Dev mailing list