Issue #17172: Add the ability to run turtledemo from Idle.

Make turtledemo start as active on Mac even when run with subprocess.
Patch by Ramchandra Apt, Lita Cho, and Ned Daily.
This commit is contained in:
Terry Jan Reedy 2014-07-28 22:23:59 -04:00
parent c61c170b41
commit 7e55db2bc5
3 changed files with 30 additions and 0 deletions

View file

@ -8,6 +8,8 @@ the PythonShell window, and a Format menu which is only present in the Editor
windows.
"""
from importlib.util import find_spec
from idlelib.configHandler import idleConf
# Warning: menudefs is altered in macosxSupport.overrideRootMenu()
@ -86,4 +88,7 @@ menudefs = [
]),
]
if find_spec('turtledemo'):
menudefs[-1][1].append(('Turtle Demo', '<<open-turtle-demo>>'))
default_keydefs = idleConf.GetCurrentKeySet()