Tkinter and IDE's

Mike Clarkson support at internetdiscovery.com
Tue Nov 20 07:11:59 CET 2001


On Mon, 19 Nov 2001 16:54:51 -0800, "John Roth"
<johnroth at ameritech.net> wrote:

>"Don Arnold" <darnold02 at sprynet.com> wrote in message
>news:9t9qsb$4nd$1 at slb3.atl.mindspring.net...
>> I'm new to python and am interested in developing apps with Tkinter.
>> However, every IDE I've come across for the Win32 platform experiences
>> lockups/aborts when running Tkinter code. So far I've tried IDLE,
>PythonWin,
>> and WING with little luck. Does anyone know of an IDE that
>successfully
>> executes Tkinter code?

Don: Can you describe the lockups/aborts when using IDLE? Do you
have a small test program that shows this? It would be very helpful.

>There's a known problem with Tcl/tk that causes these lockups;

John: he hasn't described the lockups enough to conclude that,
nor has he said he's running in Win9x using Idle from a console
window using python.exe instead of pythonw.exe (the default).
That's a different problem, that is neither a lockup nor an abort.

>at least, I assume it's with tcl/tk since it's been discussed
>sporadically
>for quite a while, and the last time, someone said they had seen it in
>a pure tcl/tk environment.

If anyone said that they were wrong, because in any Tcl <= Tcl 8.3.4
it is not even possible to load Tk into a running Windows console Tcl.
There is no Tcl equivalent to 'import Tkinter' into a python.exe.

>I suspect that the long term solution is going to be IBM's anygui
>project.

If there are lockups and/or aborts using Idle to build Tkinter apps,
they should be diagnosed and solved.  It is possible that there is a
problem in the C code for mainloop, and if so, you should be able to
work around this by running your own mainloop in Python:

	self.done = -1
                 while self.done < 0:
                        self.tk.dooneevent(0)

where your self.quit() method sets self.done to 1.

Mike.



More information about the Python-list mailing list