[issue27294] Better repr for Tkinter event objects

2016-07-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Addendum: I verified flag 8 is Mod1 is Numlock on Windows. http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/event-handlers.html has table that claims that 8 is Left Alt and that 16 is NumLock. From what you say above, true on non-mac *nix, and only there.

[issue27294] Better repr for Tkinter event objects

2016-07-20 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- Removed message: http://bugs.python.org/msg268826 ___ Python tracker ___

[issue27294] Better repr for Tkinter event objects

2016-07-20 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- Removed message: http://bugs.python.org/msg268824 ___ Python tracker ___

[issue27294] Better repr for Tkinter event objects

2016-06-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: That's with this issue. I think we will return to Event repr after implementing named flags and providing standard mechanism for parsing and creating keystrokes (there are elements of this in IDLE). -- resolution: -> fixed stage: commit review ->

[issue27294] Better repr for Tkinter event objects

2016-06-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The last three commits actually are related to issue27079. -- ___ Python tracker ___

[issue27294] Better repr for Tkinter event objects

2016-06-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset d7b6c07bc713 by Serhiy Storchaka in branch '3.5': Issue #27294: Numerical state in the repr for Tkinter event objects is now https://hg.python.org/cpython/rev/d7b6c07bc713 New changeset ac8338546ca8 by Serhiy Storchaka in branch '2.7': Issue

[issue27294] Better repr for Tkinter event objects

2016-06-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset e0ec4abe659f by Serhiy Storchaka in branch 'default': Issue #27294: Numerical state in the repr for Tkinter event objects is now https://hg.python.org/cpython/rev/e0ec4abe659f -- ___ Python tracker

[issue27294] Better repr for Tkinter event objects

2016-06-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: According to Tk sources on Mac OSX: Mod1 is Command (=Meta), Mod2 is Option (=Alt), Mod3 is NumLock, Mod4 is Fn. -- ___ Python tracker

[issue27294] Better repr for Tkinter event objects

2016-06-13 Thread Terry J. Reedy
Changes by Terry J. Reedy : Added file: http://bugs.python.org/file43377/tk-win-key-events2.txt ___ Python tracker ___

[issue27294] Better repr for Tkinter event objects

2016-06-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Terry, this information is helpful. Mod1 is Alt on X11, but not on Windows. It looks to me that on Windows Mod1 is NumLock, Mod3 is ScrollLock, 0x2 is Alt, 0x4 is pad keyboard. It is not clear about Win. What events are emitted if your

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you want more, say so, and I will do them after resting. -- Added file: http://bugs.python.org/file43352/tk-win-key-events.txt ___ Python tracker

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Next patch decodes the state attribute. Modifier names can be platform depended, please test on Windows. What modifiers correspond Shift, Ctrl, Alt, Win, CapsLock, etc? -- Added file:

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 61a92a102b2d by Serhiy Storchaka in branch 'default': Issue #27294: Improved repr for Tkinter event objects. https://hg.python.org/cpython/rev/61a92a102b2d -- nosy: +python-dev ___ Python tracker

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Right. This is why I suggested leaving anything we are not sure of to a later patch, after gaining more experience (and thought). However, 'state' behaved strangely in my experiments. In a sequence of about 900 events, it started as 8 (Left Alt according to

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The key state can be interesting for mouse events too. Ctrl-Click, Shift-Move. Maybe it is worth to omit the output of state=0. Agreed, the 4 mouse positions are pretty noisy. Maybe omit root_x and root_y? But mouse position can be relevant for such key

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Summary: Though I would like to see some refinements, this looks really useful as is and I would like it applied soon even if refinements have to wait for a second patch. Moving the window did not generate a printed event. I like the compact way of handling

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Testing now. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you have no something to add, I'll push the patch. -- ___ Python tracker ___

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Is this something that you might push before a2 tomorrow? (If I review now?) Or still in development? -- ___ Python tracker

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry yet once. Uploaded patch contained experimental implementation. Here is cleaned patch. -- Added file: http://bugs.python.org/file43343/tkinter_event_repr.patch ___ Python tracker

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file43342/tkinter_event_repr.patch ___ Python tracker ___

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oops! Sorry, here is a patch. Event.type is decoded. The address of the Event object is omitted as don't having much sense (this is short-living object). The name of widget is omitted since it is too long and usually know (in any case you can easy print

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: +1! This would be helpful for exploration and quite possibly for tests. Earlier this year, I bound to a custom function(event) printing event.x, event.y so I could discover how the line thickness of Canvas rectangles was distributed inside and outside the

[issue27294] Better repr for Tkinter event objects

2016-06-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: 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