It could be an interaction between idle's TKinter code and yours. Do you get the same problem when you run the script from the command line? If not, you could use emacs and python-mode, instead. Alex.