summaryrefslogtreecommitdiff
path: root/Lib/idlelib/EditorWindow.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-07-28 22:24:20 -0400
committerTerry Jan Reedy <tjreedy@udel.edu>2014-07-28 22:24:20 -0400
commitc95e88cd25499f81aea469c729b998c6cf4bd5b2 (patch)
treebeae87f174500bac6dd4f79947f860488859c52b /Lib/idlelib/EditorWindow.py
parent6b08235a034b42c9b5bd9408ed64022fcab56ef6 (diff)
parent7e55db2bc566381bfda3ddcd44c048f0c627880f (diff)
downloadcpython-git-c95e88cd25499f81aea469c729b998c6cf4bd5b2.tar.gz
Merge with 3.4
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r--Lib/idlelib/EditorWindow.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index f3df8eacc9..94cf31429d 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -222,6 +222,7 @@ class EditorWindow(object):
text.bind("<<close-all-windows>>", self.flist.close_all_callback)
text.bind("<<open-class-browser>>", self.open_class_browser)
text.bind("<<open-path-browser>>", self.open_path_browser)
+ text.bind("<<open-turtle-demo>>", self.open_turtle_demo)
self.set_status_bar()
vbar['command'] = text.yview
@@ -705,6 +706,14 @@ class EditorWindow(object):
from idlelib import PathBrowser
PathBrowser.PathBrowser(self.flist)
+ def open_turtle_demo(self, event = None):
+ import subprocess
+
+ cmd = [sys.executable,
+ '-c',
+ 'from turtledemo.__main__ import main; main()']
+ p = subprocess.Popen(cmd, shell=False)
+
def gotoline(self, lineno):
if lineno is not None and lineno > 0:
self.text.mark_set("insert", "%d.0" % lineno)