Tkinter hangs again under Windows

jbhr at my-deja.com jbhr at my-deja.com
Mon Jan 17 07:00:39 EST 2000


By searching the FAQ and Deja News, the last time I saw this
mentioned was May 1999.

Python 1.5.2, newest Windows Installer with Tcl/Tk 8.0.5, Windows 95b

Well, now I have the problem: tk.mainloop() seems to just ignore
any event, but only under certain circumstances.

My program opens a file and displays some information of it in a
Listbox. If the program is started with a filename argument, this
file is read, otherwise a filename is prompted via
tkFileDialog.askopenfilename(). The info is then shown.
Now, if the program is started with a filename, everything (well,
almost :-)) is working fine - I can select items in the listbox,
use the menu or the button. If the program is started without a
filename, the file select box comes up, lets me select a file, and
the info is then displayed as well. The difference starts when I try
to select something - nothing happens. A Ctrl-C always breaks in
Tkinter.py, line 492: mainloop.
This problem doesn't exist under Linux. And it's the second Windows PC
with the very same problem.

There's another (small) problem: I want the last entry in the listbox
to be shown and selected by default. The selection works, but the line
is only seen for a brief moment, then the list scrolls down one line for
no apparent reason ... Just to give complete information: I'm using
Fredrik Lundh's very handy AutoScrollbar.

This happened just when I wanted to show my boss how easy it is to
write a nice little program with python ... ;-)

Hans-Joachim Widmaier


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list