diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2014-07-29 02:23:59 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2014-07-29 02:23:59 (GMT) |
commit | 7e55db2bc566381bfda3ddcd44c048f0c627880f (patch) | |
tree | 3cc079e69282249043a7408b26d5bd10c519eeb2 /Lib/idlelib/Bindings.py | |
parent | c61c170b419be5896608baf47ca3737b94cc15da (diff) | |
download | cpython-7e55db2bc566381bfda3ddcd44c048f0c627880f.zip cpython-7e55db2bc566381bfda3ddcd44c048f0c627880f.tar.gz cpython-7e55db2bc566381bfda3ddcd44c048f0c627880f.tar.bz2 |
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.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/idlelib/Bindings.py b/Lib/idlelib/Bindings.py index df2b251..c9bef21 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() |