summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Demo/turtle/tdemo_I_dontlike_tiltdemo.py58
-rw-r--r--Demo/turtle/tdemo_lindenmayer_indian.py119
-rw-r--r--Demo/turtle/turtleDemo.py291
-rw-r--r--Doc/library/turtle.rst25
-rw-r--r--Lib/test/test_dict.py8
-rw-r--r--Lib/turtledemo/__init__.py0
-rw-r--r--Lib/turtledemo/about_turtle.txt (renamed from Demo/turtle/about_turtle.txt)0
-rw-r--r--Lib/turtledemo/about_turtledemo.txt (renamed from Demo/turtle/about_turtledemo.txt)0
-rw-r--r--Lib/turtledemo/bytedesign.py (renamed from Demo/turtle/tdemo_bytedesign.py)0
-rw-r--r--Lib/turtledemo/chaos.py (renamed from Demo/turtle/tdemo_chaos.py)0
-rw-r--r--Lib/turtledemo/clock.py (renamed from Demo/turtle/tdemo_clock.py)0
-rw-r--r--Lib/turtledemo/colormixer.py (renamed from Demo/turtle/tdemo_colormixer.py)0
-rw-r--r--Lib/turtledemo/demohelp.txt (renamed from Demo/turtle/demohelp.txt)0
-rw-r--r--Lib/turtledemo/forest.py (renamed from Demo/turtle/tdemo_forest.py)0
-rw-r--r--Lib/turtledemo/fractalcurves.py (renamed from Demo/turtle/tdemo_fractalcurves.py)0
-rw-r--r--Lib/turtledemo/minimal_hanoi.py (renamed from Demo/turtle/tdemo_minimal_hanoi.py)0
-rw-r--r--Lib/turtledemo/nim.py (renamed from Demo/turtle/tdemo_nim.py)0
-rw-r--r--Lib/turtledemo/paint.py (renamed from Demo/turtle/tdemo_paint.py)0
-rw-r--r--Lib/turtledemo/peace.py (renamed from Demo/turtle/tdemo_peace.py)0
-rw-r--r--Lib/turtledemo/penrose.py (renamed from Demo/turtle/tdemo_penrose.py)0
-rw-r--r--Lib/turtledemo/planet_and_moon.py (renamed from Demo/turtle/tdemo_planet_and_moon.py)0
-rw-r--r--Lib/turtledemo/round_dance.py (renamed from Demo/turtle/tdemo_round_dance.py)0
-rw-r--r--Lib/turtledemo/tree.py (renamed from Demo/turtle/tdemo_tree.py)0
-rw-r--r--Lib/turtledemo/turtle.cfg (renamed from Demo/turtle/turtle.cfg)0
-rw-r--r--Lib/turtledemo/two_canvases.py (renamed from Demo/turtle/turtledemo_two_canvases.py)8
-rw-r--r--Lib/turtledemo/wikipedia.py (renamed from Demo/turtle/tdemo_wikipedia.py)0
-rw-r--r--Lib/turtledemo/yinyang.py (renamed from Demo/turtle/tdemo_yinyang.py)0
-rw-r--r--Makefile.pre.in1
-rw-r--r--Misc/NEWS3
29 files changed, 32 insertions, 481 deletions
diff --git a/Demo/turtle/tdemo_I_dontlike_tiltdemo.py b/Demo/turtle/tdemo_I_dontlike_tiltdemo.py
deleted file mode 100644
index 1e5c440..0000000
--- a/Demo/turtle/tdemo_I_dontlike_tiltdemo.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env python3
-""" turtle-example-suite:
-
- tdemo-I_dont_like_tiltdemo.py
-
-Demostrates
- (a) use of a tilted ellipse as
- turtle shape
- (b) stamping that shape
-
-We can remove it, if you don't like it.
- Without using reset() ;-)
- ---------------------------------------
-"""
-from turtle import *
-import time
-
-def main():
- reset()
- shape("circle")
- resizemode("user")
-
- pu(); bk(24*18/6.283); rt(90); pd()
- tilt(45)
-
- pu()
-
- turtlesize(16,10,5)
- color("red", "violet")
- for i in range(18):
- fd(24)
- lt(20)
- stamp()
- color("red", "")
- for i in range(18):
- fd(24)
- lt(20)
- stamp()
-
- tilt(-15)
- turtlesize(3, 1, 4)
- color("blue", "yellow")
- for i in range(17):
- fd(24)
- lt(20)
- if i%2 == 0:
- stamp()
- time.sleep(1)
- while undobufferentries():
- undo()
- ht()
- write("OK, OVER!", align="center", font=("Courier", 18, "bold"))
- return "Done!"
-
-if __name__=="__main__":
- msg = main()
- print(msg)
-# mainloop()
diff --git a/Demo/turtle/tdemo_lindenmayer_indian.py b/Demo/turtle/tdemo_lindenmayer_indian.py
deleted file mode 100644
index 3925f25..0000000
--- a/Demo/turtle/tdemo_lindenmayer_indian.py
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/usr/bin/env python3
-""" turtle-example-suite:
-
- xtx_lindenmayer_indian.py
-
-Each morning women in Tamil Nadu, in southern
-India, place designs, created by using rice
-flour and known as kolam on the thresholds of
-their homes.
-
-These can be described by Lindenmayer systems,
-which can easily be implemented with turtle
-graphics and Python.
-
-Two examples are shown here:
-(1) the snake kolam
-(2) anklets of Krishna
-
-Taken from Marcia Ascher: Mathematics
-Elsewhere, An Exploration of Ideas Across
-Cultures
-
-"""
-################################
-# Mini Lindenmayer tool
-###############################
-
-from turtle import *
-
-def replace( seq, replacementRules, n ):
- for i in range(n):
- newseq = ""
- for element in seq:
- newseq = newseq + replacementRules.get(element,element)
- seq = newseq
- return seq
-
-def draw( commands, rules ):
- for b in commands:
- try:
- rules[b]()
- except TypeError:
- try:
- draw(rules[b], rules)
- except:
- pass
-
-
-def main():
- ################################
- # Example 1: Snake kolam
- ################################
-
-
- def r():
- right(45)
-
- def l():
- left(45)
-
- def f():
- forward(7.5)
-
- snake_rules = {"-":r, "+":l, "f":f, "b":"f+f+f--f--f+f+f"}
- snake_replacementRules = {"b": "b+f+b--f--b+f+b"}
- snake_start = "b--f--b--f"
-
- drawing = replace(snake_start, snake_replacementRules, 3)
-
- reset()
- speed(3)
- tracer(1,0)
- ht()
- up()
- backward(195)
- down()
- draw(drawing, snake_rules)
-
- from time import sleep
- sleep(3)
-
- ################################
- # Example 2: Anklets of Krishna
- ################################
-
- def A():
- color("red")
- circle(10,90)
-
- def B():
- from math import sqrt
- color("black")
- l = 5/sqrt(2)
- forward(l)
- circle(l, 270)
- forward(l)
-
- def F():
- color("green")
- forward(10)
-
- krishna_rules = {"a":A, "b":B, "f":F}
- krishna_replacementRules = {"a" : "afbfa", "b" : "afbfbfbfa" }
- krishna_start = "fbfbfbfb"
-
- reset()
- speed(0)
- tracer(3,0)
- ht()
- left(45)
- drawing = replace(krishna_start, krishna_replacementRules, 3)
- draw(drawing, krishna_rules)
- tracer(1)
- return "Done!"
-
-if __name__=='__main__':
- msg = main()
- print(msg)
- mainloop()
diff --git a/Demo/turtle/turtleDemo.py b/Demo/turtle/turtleDemo.py
deleted file mode 100644
index b5b99c0..0000000
--- a/Demo/turtle/turtleDemo.py
+++ /dev/null
@@ -1,291 +0,0 @@
-#!/usr/bin/env python3
-import sys
-import os
-
-from tkinter import *
-from idlelib.Percolator import Percolator
-from idlelib.ColorDelegator import ColorDelegator
-from idlelib.textView import view_file # TextViewer
-from imp import reload
-
-import turtle
-import time
-
-STARTUP = 1
-READY = 2
-RUNNING = 3
-DONE = 4
-EVENTDRIVEN = 5
-
-menufont = ("Arial", 12, NORMAL)
-btnfont = ("Arial", 12, 'bold')
-txtfont = ('Lucida Console', 8, 'normal')
-
-def getExampleEntries():
- cwd = os.getcwd()
- #print(cwd, os.listdir(cwd))
- if "turtleDemo.py" not in os.listdir(cwd):
- print("Directory of turtleDemo must be current working directory!")
- print("But in your case this is", cwd)
- sys.exit()
- entries1 = [entry for entry in os.listdir(cwd) if
- entry.startswith("tdemo_") and
- not entry.endswith(".pyc")]
- entries2 = []
- for entry in entries1:
- if entry.endswith(".py"):
- entries2.append(entry)
- else:
- path = os.path.join(cwd,entry)
- sys.path.append(path)
- subdir = [entry]
- scripts = [script for script in os.listdir(path) if
- script.startswith("tdemo_") and
- script.endswith(".py")]
- entries2.append(subdir+scripts)
- return entries2
-
-def showDemoHelp():
- view_file(demo.root, "Help on turtleDemo", "demohelp.txt")
-
-def showAboutDemo():
- view_file(demo.root, "About turtleDemo", "about_turtledemo.txt")
-
-def showAboutTurtle():
- view_file(demo.root, "About the new turtle module.", "about_turtle.txt")
-
-class DemoWindow(object):
-
- def __init__(self, filename=None): #, root=None):
- self.root = root = turtle._root = Tk()
- root.wm_protocol("WM_DELETE_WINDOW", self._destroy)
-
- #################
- self.mBar = Frame(root, relief=RAISED, borderwidth=2)
- self.mBar.pack(fill=X)
-
- self.ExamplesBtn = self.makeLoadDemoMenu()
- self.OptionsBtn = self.makeHelpMenu()
- self.mBar.tk_menuBar(self.ExamplesBtn, self.OptionsBtn) #, QuitBtn)
-
- root.title('Python turtle-graphics examples')
- #################
- self.left_frame = left_frame = Frame(root)
- self.text_frame = text_frame = Frame(left_frame)
- self.vbar = vbar =Scrollbar(text_frame, name='vbar')
- self.text = text = Text(text_frame,
- name='text', padx=5, wrap='none',
- width=45)
- vbar['command'] = text.yview
- vbar.pack(side=LEFT, fill=Y)
- #####################
- self.hbar = hbar =Scrollbar(text_frame, name='hbar', orient=HORIZONTAL)
- hbar['command'] = text.xview
- hbar.pack(side=BOTTOM, fill=X)
- #####################
- text['yscrollcommand'] = vbar.set
- text.config(font=txtfont)
- text.config(xscrollcommand=hbar.set)
- text.pack(side=LEFT, fill=Y, expand=1)
- #####################
- self.output_lbl = Label(left_frame, height= 1,text=" --- ", bg = "#ddf",
- font = ("Arial", 16, 'normal'))
- self.output_lbl.pack(side=BOTTOM, expand=0, fill=X)
- #####################
- text_frame.pack(side=LEFT, fill=BOTH, expand=0)
- left_frame.pack(side=LEFT, fill=BOTH, expand=0)
- self.graph_frame = g_frame = Frame(root)
-
- turtle._Screen._root = g_frame
- turtle._Screen._canvas = turtle.ScrolledCanvas(g_frame, 800, 600, 1000, 800)
- #xturtle.Screen._canvas.pack(expand=1, fill="both")
- self.screen = _s_ = turtle.Screen()
-#####
- turtle.TurtleScreen.__init__(_s_, _s_._canvas)
-#####
- self.scanvas = _s_._canvas
- #xturtle.RawTurtle.canvases = [self.scanvas]
- turtle.RawTurtle.screens = [_s_]
-
- self.scanvas.pack(side=TOP, fill=BOTH, expand=1)
-
- self.btn_frame = btn_frame = Frame(g_frame, height=100)
- self.start_btn = Button(btn_frame, text=" START ", font=btnfont, fg = "white",
- disabledforeground = "#fed", command=self.startDemo)
- self.start_btn.pack(side=LEFT, fill=X, expand=1)
- self.stop_btn = Button(btn_frame, text=" STOP ", font=btnfont, fg = "white",
- disabledforeground = "#fed", command = self.stopIt)
- self.stop_btn.pack(side=LEFT, fill=X, expand=1)
- self.clear_btn = Button(btn_frame, text=" CLEAR ", font=btnfont, fg = "white",
- disabledforeground = "#fed", command = self.clearCanvas)
- self.clear_btn.pack(side=LEFT, fill=X, expand=1)
-
- self.btn_frame.pack(side=TOP, fill=BOTH, expand=0)
- self.graph_frame.pack(side=TOP, fill=BOTH, expand=1)
-
- Percolator(text).insertfilter(ColorDelegator())
- self.dirty = False
- self.exitflag = False
- if filename:
- self.loadfile(filename)
- self.configGUI(NORMAL, DISABLED, DISABLED, DISABLED,
- "Choose example from menu", "black")
- self.state = STARTUP
-
- def _destroy(self):
- self.root.destroy()
- sys.exit()
-
- def configGUI(self, menu, start, stop, clear, txt="", color="blue"):
- self.ExamplesBtn.config(state=menu)
-
- self.start_btn.config(state=start)
- if start==NORMAL:
- self.start_btn.config(bg="#d00")
- else:
- self.start_btn.config(bg="#fca")
-
- self.stop_btn.config(state=stop)
- if stop==NORMAL:
- self.stop_btn.config(bg="#d00")
- else:
- self.stop_btn.config(bg="#fca")
- self.clear_btn.config(state=clear)
-
- self.clear_btn.config(state=clear)
- if clear==NORMAL:
- self.clear_btn.config(bg="#d00")
- else:
- self.clear_btn.config(bg="#fca")
-
- self.output_lbl.config(text=txt, fg=color)
-
-
- def makeLoadDemoMenu(self):
- CmdBtn = Menubutton(self.mBar, text='Examples', underline=0, font=menufont)
- CmdBtn.pack(side=LEFT, padx="2m")
- CmdBtn.menu = Menu(CmdBtn)
-
- for entry in getExampleEntries():
- def loadexample(x):
- def emit():
- self.loadfile(x)
- return emit
- if isinstance(entry,str):
- CmdBtn.menu.add_command(label=entry[6:-3], underline=0, font=menufont,
- command=loadexample(entry))
- else:
- _dir, entries = entry[0], entry[1:]
- CmdBtn.menu.choices = Menu(CmdBtn.menu)
- for e in entries:
- CmdBtn.menu.choices.add_command(label=e[6:-3], underline=0, font=menufont,
- command = loadexample(os.path.join(_dir,e)))
-
- CmdBtn.menu.add_cascade(label=_dir[6:],
- menu = CmdBtn.menu.choices, font=menufont )
-
- CmdBtn['menu'] = CmdBtn.menu
- return CmdBtn
-
-
- def makeHelpMenu(self):
- CmdBtn = Menubutton(self.mBar, text='Help', underline=0, font = menufont)
- CmdBtn.pack(side=LEFT, padx='2m')
- CmdBtn.menu = Menu(CmdBtn)
-
- CmdBtn.menu.add_command(label='About turtle.py', font=menufont, command=showAboutTurtle)
- CmdBtn.menu.add_command(label='turtleDemo - Help', font=menufont, command=showDemoHelp)
- CmdBtn.menu.add_command(label='About turtleDemo', font=menufont, command=showAboutDemo)
-
- CmdBtn['menu'] = CmdBtn.menu
- return CmdBtn
-
- def refreshCanvas(self):
- if not self.dirty: return
- self.screen.clear()
- #self.screen.mode("standard")
- self.dirty=False
-
- def loadfile(self,filename):
- self.refreshCanvas()
- if os.path.exists(filename) and not os.path.isdir(filename):
- # load and display file text
- f = open(filename,'r')
- chars = f.read()
- f.close()
- self.text.delete("1.0", "end")
- self.text.insert("1.0",chars)
- direc, fname = os.path.split(filename)
- self.root.title(fname[6:-3]+" - a Python turtle graphics example")
- self.module = __import__(fname[:-3])
- reload(self.module)
- self.configGUI(NORMAL, NORMAL, DISABLED, DISABLED,
- "Press start button", "red")
- self.state = READY
-
- def startDemo(self):
- self.refreshCanvas()
- self.dirty = True
- turtle.TurtleScreen._RUNNING = True
- self.configGUI(DISABLED, DISABLED, NORMAL, DISABLED,
- "demo running...", "black")
- self.screen.clear()
- self.screen.mode("standard")
- self.state = RUNNING
-
- try:
- result = self.module.main()
- if result == "EVENTLOOP":
- self.state = EVENTDRIVEN
- else:
- self.state = DONE
- except turtle.Terminator:
- self.state = DONE
- result = "stopped!"
- if self.state == DONE:
- self.configGUI(NORMAL, NORMAL, DISABLED, NORMAL,
- result)
- elif self.state == EVENTDRIVEN:
- self.exitflag = True
- self.configGUI(DISABLED, DISABLED, NORMAL, DISABLED,
- "use mouse/keys or STOP", "red")
-
- def clearCanvas(self):
- self.refreshCanvas()
- self.screen._delete("all")
- self.scanvas.config(cursor="")
- self.configGUI(NORMAL, NORMAL, DISABLED, DISABLED)
-
- def stopIt(self):
- if self.exitflag:
- self.clearCanvas()
- self.exitflag = False
- self.configGUI(NORMAL, NORMAL, DISABLED, DISABLED,
- "STOPPED!", "red")
- turtle.TurtleScreen._RUNNING = False
- #print "stopIT: exitflag = True"
- else:
- turtle.TurtleScreen._RUNNING = False
- #print "stopIt: exitflag = False"
-
-if __name__ == '__main__':
- demo = DemoWindow()
- RUN = True
- while RUN:
- try:
- #print("ENTERING mainloop")
- demo.root.mainloop()
- except AttributeError:
- #print("AttributeError!- WAIT A MOMENT!")
- time.sleep(0.3)
- print("GOING ON ..")
- demo.ckearCanvas()
- except TypeError:
- demo.screen._delete("all")
- #print("CRASH!!!- WAIT A MOMENT!")
- time.sleep(0.3)
- #print("GOING ON ..")
- demo.clearCanvas()
- except:
- print("BYE!")
- RUN = False
diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst
index d424b43..d96a543 100644
--- a/Doc/library/turtle.rst
+++ b/Doc/library/turtle.rst
@@ -2266,29 +2266,36 @@ not from within the demo-viewer).
Demo scripts
============
-There is a set of demo scripts in the turtledemo directory located in the
-:file:`Demo/turtle` directory in the source distribution.
+There is a set of demo scripts in the :mod:`turtledemo` package. These
+scripts can be run and viewed using the supplied demo viewer as follows::
-It contains:
+ python -m turtledemo
+
+Alternatively, you can run the demo scripts individually. For example,
+
+::
+ python -m turtledemo.bytedesign
+
+The :mod:`turtledemo` package directory contains:
- a set of 15 demo scripts demonstrating different features of the new module
- :mod:`turtle`
-- a demo viewer :file:`turtleDemo.py` which can be used to view the sourcecode
+ :mod:`turtle`;
+- a demo viewer :file:`__main__.py` which can be used to view the sourcecode
of the scripts and run them at the same time. 14 of the examples can be
accessed via the Examples menu; all of them can also be run standalone.
-- The example :file:`turtledemo_two_canvases.py` demonstrates the simultaneous
+- The example :mod:`turtledemo.two_canvases` demonstrates the simultaneous
use of two canvases with the turtle module. Therefore it only can be run
standalone.
-- There is a :file:`turtle.cfg` file in this directory, which also serves as an
+- There is a :file:`turtle.cfg` file in this directory, which serves as an
example for how to write and use such files.
-The demoscripts are:
+The demo scripts are:
+----------------+------------------------------+-----------------------+
| Name | Description | Features |
+----------------+------------------------------+-----------------------+
| bytedesign | complex classical | :func:`tracer`, delay,|
-| | turtlegraphics pattern | :func:`update` |
+| | turtle graphics pattern | :func:`update` |
+----------------+------------------------------+-----------------------+
| chaos | graphs verhust dynamics, | world coordinates |
| | proves that you must not | |
diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py
index 818c99e..055bfd8 100644
--- a/Lib/test/test_dict.py
+++ b/Lib/test/test_dict.py
@@ -329,11 +329,19 @@ class DictTest(unittest.TestCase):
k, v = 'abc', 'def'
d[k] = v
self.assertRaises(KeyError, d.pop, 'ghi')
+ try:
+ d.pop('ghi')
+ except KeyError as e:
+ self.assertEquals(e.args[0], 'ghi')
self.assertEqual(d.pop(k), v)
self.assertEqual(len(d), 0)
self.assertRaises(KeyError, d.pop, k)
+ try:
+ d.pop(k)
+ except KeyError as e:
+ self.assertEquals(e.args[0], k)
self.assertEqual(d.pop(k, v), v)
d[k] = v
diff --git a/Lib/turtledemo/__init__.py b/Lib/turtledemo/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Lib/turtledemo/__init__.py
diff --git a/Demo/turtle/about_turtle.txt b/Lib/turtledemo/about_turtle.txt
index e4ba217..e4ba217 100644
--- a/Demo/turtle/about_turtle.txt
+++ b/Lib/turtledemo/about_turtle.txt
diff --git a/Demo/turtle/about_turtledemo.txt b/Lib/turtledemo/about_turtledemo.txt
index 54c25a5..54c25a5 100644
--- a/Demo/turtle/about_turtledemo.txt
+++ b/Lib/turtledemo/about_turtledemo.txt
diff --git a/Demo/turtle/tdemo_bytedesign.py b/Lib/turtledemo/bytedesign.py
index 96118b3..96118b3 100644
--- a/Demo/turtle/tdemo_bytedesign.py
+++ b/Lib/turtledemo/bytedesign.py
diff --git a/Demo/turtle/tdemo_chaos.py b/Lib/turtledemo/chaos.py
index d4656f8..d4656f8 100644
--- a/Demo/turtle/tdemo_chaos.py
+++ b/Lib/turtledemo/chaos.py
diff --git a/Demo/turtle/tdemo_clock.py b/Lib/turtledemo/clock.py
index a0d157b..a0d157b 100644
--- a/Demo/turtle/tdemo_clock.py
+++ b/Lib/turtledemo/clock.py
diff --git a/Demo/turtle/tdemo_colormixer.py b/Lib/turtledemo/colormixer.py
index f5d308d..f5d308d 100644
--- a/Demo/turtle/tdemo_colormixer.py
+++ b/Lib/turtledemo/colormixer.py
diff --git a/Demo/turtle/demohelp.txt b/Lib/turtledemo/demohelp.txt
index 5683875..5683875 100644
--- a/Demo/turtle/demohelp.txt
+++ b/Lib/turtledemo/demohelp.txt
diff --git a/Demo/turtle/tdemo_forest.py b/Lib/turtledemo/forest.py
index a837d84..a837d84 100644
--- a/Demo/turtle/tdemo_forest.py
+++ b/Lib/turtledemo/forest.py
diff --git a/Demo/turtle/tdemo_fractalcurves.py b/Lib/turtledemo/fractalcurves.py
index c49f8b8..c49f8b8 100644
--- a/Demo/turtle/tdemo_fractalcurves.py
+++ b/Lib/turtledemo/fractalcurves.py
diff --git a/Demo/turtle/tdemo_minimal_hanoi.py b/Lib/turtledemo/minimal_hanoi.py
index cfb78dc..cfb78dc 100644
--- a/Demo/turtle/tdemo_minimal_hanoi.py
+++ b/Lib/turtledemo/minimal_hanoi.py
diff --git a/Demo/turtle/tdemo_nim.py b/Lib/turtledemo/nim.py
index 792ba51..792ba51 100644
--- a/Demo/turtle/tdemo_nim.py
+++ b/Lib/turtledemo/nim.py
diff --git a/Demo/turtle/tdemo_paint.py b/Lib/turtledemo/paint.py
index 68058ab..68058ab 100644
--- a/Demo/turtle/tdemo_paint.py
+++ b/Lib/turtledemo/paint.py
diff --git a/Demo/turtle/tdemo_peace.py b/Lib/turtledemo/peace.py
index 63cf7cc..63cf7cc 100644
--- a/Demo/turtle/tdemo_peace.py
+++ b/Lib/turtledemo/peace.py
diff --git a/Demo/turtle/tdemo_penrose.py b/Lib/turtledemo/penrose.py
index f73c864..f73c864 100644
--- a/Demo/turtle/tdemo_penrose.py
+++ b/Lib/turtledemo/penrose.py
diff --git a/Demo/turtle/tdemo_planet_and_moon.py b/Lib/turtledemo/planet_and_moon.py
index 14c4bbc..14c4bbc 100644
--- a/Demo/turtle/tdemo_planet_and_moon.py
+++ b/Lib/turtledemo/planet_and_moon.py
diff --git a/Demo/turtle/tdemo_round_dance.py b/Lib/turtledemo/round_dance.py
index 1038361..1038361 100644
--- a/Demo/turtle/tdemo_round_dance.py
+++ b/Lib/turtledemo/round_dance.py
diff --git a/Demo/turtle/tdemo_tree.py b/Lib/turtledemo/tree.py
index 9c0b1f7..9c0b1f7 100644
--- a/Demo/turtle/tdemo_tree.py
+++ b/Lib/turtledemo/tree.py
diff --git a/Demo/turtle/turtle.cfg b/Lib/turtledemo/turtle.cfg
index bd89a74..bd89a74 100644
--- a/Demo/turtle/turtle.cfg
+++ b/Lib/turtledemo/turtle.cfg
diff --git a/Demo/turtle/turtledemo_two_canvases.py b/Lib/turtledemo/two_canvases.py
index d2d7188..02d89db 100644
--- a/Demo/turtle/turtledemo_two_canvases.py
+++ b/Lib/turtledemo/two_canvases.py
@@ -44,9 +44,9 @@ for t in p,q:
## Want to get some info?
-print(s1, s2)
-print(p, q)
-print(s1.turtles())
-print(s2.turtles())
+#print(s1, s2)
+#print(p, q)
+#print(s1.turtles())
+#print(s2.turtles())
TK.mainloop()
diff --git a/Demo/turtle/tdemo_wikipedia.py b/Lib/turtledemo/wikipedia.py
index 73e03d2..73e03d2 100644
--- a/Demo/turtle/tdemo_wikipedia.py
+++ b/Lib/turtledemo/wikipedia.py
diff --git a/Demo/turtle/tdemo_yinyang.py b/Lib/turtledemo/yinyang.py
index 11d1f47..11d1f47 100644
--- a/Demo/turtle/tdemo_yinyang.py
+++ b/Lib/turtledemo/yinyang.py
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 475d272..ffa1cb0 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -893,6 +893,7 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
importlib/test/extension importlib/test/frozen \
importlib/test/import_ importlib/test/source \
setuptools setuptools/command setuptools/tests setuptools.egg-info \
+ turtledemo \
multiprocessing multiprocessing/dummy \
unittest unittest/test \
curses pydoc_data $(MACHDEPS)
diff --git a/Misc/NEWS b/Misc/NEWS
index 5097b95..9cb2589 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -59,6 +59,9 @@ Core and Builtins
Library
-------
+- Issue #10199: New package, ``turtledemo`` now contains selected demo
+ scripts that were formerly found under Demo/turtle.
+
- Issue #10265: Close file objects explicitly in sunau. Patch by Brian Brazil.
- Issue #10266: uu.decode didn't close in_file explicitly when it was given