[issue35770] IDLE: python -m idlelib fails on master on Mac OS 10.10.4
Cheryl Sabella
report at bugs.python.org
Fri Jan 18 13:32:50 EST 2019
Cheryl Sabella <cheryl.sabella at gmail.com> added the comment:
I'll submit a quick PR as a PoC. Tal emailed with additional ideas about menudefs, so I agree that another issue would probably be suitable for more discussion.
I haven't looked at the extensions too closely yet, but the insert you're referring to is actually on the 'values' part, so it's not an issue.
mainmenu.menudefs[0][1] refers to menu item 0 (file menu) and the [1] means the nested list of tuples within menu 0. I learned that while converting to a dict.
A trickier one is this because it changes the menus:
mainmenu.menudefs.insert(0,
('application', [
('About IDLE', '<<about-idle>>'),
None,
]))
But I think this will work for that:
appmenu = {'application': [
('About IDLE', '<<about-idle>>'),
None,
]}
mainmenu.menudefs = {**appmenu, **mainmenu.menudefs}
----------
stage: patch review -> needs patch
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35770>
_______________________________________
More information about the Python-bugs-list
mailing list