Message268209
Proposed patch adds better repr for tkinter.Event objects. Currently default repr shows only class name (always the same) and object address (not interesting, since event objects are short-living). The patch makes repr showing most event attributes in human-readable form.
For testing run following script. Press any keys (with modifiers), move and click mouse, select text, move and resize the window, switch to other windows.
import tkinter
t = tkinter.Text()
t.pack()
t.bind("<<Selection>>", print)
t.bind("<<debug>>", print)
for k in tkinter.EventType:
try:
t.event_add("<<debug>>", '<%s>' % k)
except tkinter.TclError:
pass
tkinter.mainloop() |
|
Date |
User |
Action |
Args |
2016-06-11 12:35:57 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, terry.reedy |
2016-06-11 12:35:57 | serhiy.storchaka | set | messageid: <1465648557.25.0.737232700025.issue27294@psf.upfronthosting.co.za> |
2016-06-11 12:35:57 | serhiy.storchaka | link | issue27294 messages |
2016-06-11 12:35:56 | serhiy.storchaka | create | |
|