diff -r 2bda1065e931 Lib/idlelib/Bindings.py --- a/Lib/idlelib/Bindings.py Sun Mar 09 20:59:24 2014 -0500 +++ b/Lib/idlelib/Bindings.py Fri May 23 11:22:47 2014 -0700 @@ -20,6 +20,7 @@ ('Open _Module...', '<>'), ('Class _Browser', '<>'), ('_Path Browser', '<>'), + ('Turtle Demo', '<>'), None, ('_Save', '<>'), ('Save _As...', '<>'), diff -r 2bda1065e931 Lib/idlelib/EditorWindow.py --- a/Lib/idlelib/EditorWindow.py Sun Mar 09 20:59:24 2014 -0500 +++ b/Lib/idlelib/EditorWindow.py Fri May 23 11:22:47 2014 -0700 @@ -220,6 +220,7 @@ text.bind("<>", self.flist.close_all_callback) text.bind("<>", self.open_class_browser) text.bind("<>", self.open_path_browser) + text.bind("<>", self.open_turtle_demo) self.set_status_bar() vbar['command'] = text.yview @@ -703,6 +704,10 @@ from idlelib import PathBrowser PathBrowser.PathBrowser(self.flist) + def open_turtle_demo(self, event = None): + import turtledemo.__main__ + turtledemo.__main__.main() + def gotoline(self, lineno): if lineno is not None and lineno > 0: self.text.mark_set("insert", "%d.0" % lineno) diff -r 2bda1065e931 Lib/idlelib/NEWS.txt --- a/Lib/idlelib/NEWS.txt Sun Mar 09 20:59:24 2014 -0500 +++ b/Lib/idlelib/NEWS.txt Fri May 23 11:22:47 2014 -0700 @@ -1,5 +1,6 @@ What's New in IDLE 3.4.0? ========================= +- Issue #17172: Add turtledemo to IDLE menu. Initial patch by Ramchandra Apte. - Issue #17390: Display Python version on Idle title bar. Initial patch by Edmond Burnett. diff -r 2bda1065e931 Lib/turtledemo/__main__.py --- a/Lib/turtledemo/__main__.py Sun Mar 09 20:59:24 2014 -0500 +++ b/Lib/turtledemo/__main__.py Fri May 23 11:22:47 2014 -0700 @@ -243,7 +243,8 @@ turtle.TurtleScreen._RUNNING = False #print "stopIt: exitflag = False" -if __name__ == '__main__': +def main(): + global demo demo = DemoWindow() RUN = True while RUN: @@ -262,5 +263,8 @@ #print("GOING ON ..") demo.clearCanvas() except: - print("BYE!") + print("Exiting...") RUN = False + +if __name__ == '__main__': + main()