[PythonCE] IdleCE Major bug!!!

Ed Blake kitsune_e at yahoo.com
Thu Feb 3 19:34:01 CET 2005


This is a silly thing to miss but it didn't cause ant kind of exception or
overt problem.  Twice in a row I have tried to edit IdleCE in IdleCE and both
times after saving and closing I found that IdleCE would no longer run. 
Finally today I decided to track down the bug.  I copied my malfunctioning
version onto my PC's desktop and tried it out, same mysterious symptoms -
Python starts, waits a while, then closes with no output...  So I open the
file in Idle and run it thinking the console is just vanishing to quickly. 
In Idle though the program works.  Confused I close the IdleCE window... and
to my surprise Idle closes as well!
    Eureka!  I've run into this problem before, its caused by Tkinter apps
which don't have a mainloop.  So I open the file in Idle again and scroll to
the end of the file, then I open the outline in Leo and compare the last
lines.  The line root.mainloop() is missing in the modified version.  The
code which opens the file was reading all but the last line, the line where
root.mainloop() was.  If there where some newlines at the end of the file I
could have edited it several times before it stopped working!  Anyway here is
the repaired version:

http/kitsu/petesdomain.com/files/IdleCE.py

If anyone else has any problems feel free to complain, even if I don't get
around to it right away I am keeping a todo list for features/bugs.



More information about the PythonCE mailing list