This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka, terry.reedy
Date 2016-06-11.12:35:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465648557.25.0.737232700025.issue27294@psf.upfronthosting.co.za>
In-reply-to
Content
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()
History
Date User Action Args
2016-06-11 12:35:57serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy
2016-06-11 12:35:57serhiy.storchakasetmessageid: <1465648557.25.0.737232700025.issue27294@psf.upfronthosting.co.za>
2016-06-11 12:35:57serhiy.storchakalinkissue27294 messages
2016-06-11 12:35:56serhiy.storchakacreate