summaryrefslogtreecommitdiff
path: root/Lib/idlelib/Bindings.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-07-28 22:23:59 -0400
committerTerry Jan Reedy <tjreedy@udel.edu>2014-07-28 22:23:59 -0400
commit7e55db2bc566381bfda3ddcd44c048f0c627880f (patch)
tree3cc079e69282249043a7408b26d5bd10c519eeb2 /Lib/idlelib/Bindings.py
parentc61c170b419be5896608baf47ca3737b94cc15da (diff)
downloadcpython-git-7e55db2bc566381bfda3ddcd44c048f0c627880f.tar.gz
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.
Diffstat (limited to 'Lib/idlelib/Bindings.py')
-rw-r--r--Lib/idlelib/Bindings.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/idlelib/Bindings.py b/Lib/idlelib/Bindings.py
index df2b251426..c9bef217b9 100644
--- a/Lib/idlelib/Bindings.py
+++ b/Lib/idlelib/Bindings.py
@@ -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()