We have some code which binds events to a Tkinter widget. Works fine on Linux, but fails using the ActiveState Python on Windows. Here's the problem boiled down to the tiniest repro case I can produce:

#!/usr/bin/python

import tkFileDialog, Tkinter

def onKeyPress(event): print "event.char=%s" % event.char
root = Tkinter.Tk()
print "directory = %s" % tkFileDialog.askdirectory()
root.bind('<KeyPress>', onKeyPress)
root.mainloop()

If the line which invokes tkFileDialog.askdirectory() is commented out, then the events are caught. But when the line is left uncommented, events are ignored when running ActiveState Python on Windows (but not ignored when running on Linux). Makes no difference whether events are bound to root or to some child widget. Is this a known problem?

--
Bob Kline
http://www.rksystems.com
mailto:[EMAIL PROTECTED]


_______________________________________________ ActivePython mailing list ActivePython@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython



Reply via email to