cpython: 59cc3bfdac4b (original) (raw)
Mercurial > cpython
changeset 92103:59cc3bfdac4b
Issue #22065: Try the delete demohelp.txt part again. [#22065]
Terry Jan Reedy tjreedy@udel.edu | |
---|---|
date | Fri, 15 Aug 2014 00:47:36 -0400 |
parents | 4349bbc21ca7 |
children | 359b8d4dd006 |
files | Lib/turtledemo/demohelp.txt |
diffstat | 1 files changed, 0 insertions(+), 83 deletions(-)[+] [-] Lib/turtledemo/demohelp.txt 83 |
line wrap: on
line diff
deleted file mode 100644 --- a/Lib/turtledemo/demohelp.txt +++ /dev/null @@ -1,83 +0,0 @@ - -
- ---------------------------------------------- -
- This document has two sections: -
- (1) How to use the demo viewer
- (2) How to add your own demos to the demo repository - -
- (1) How to use the demo viewer. -
- Select a demoscript from the example menu.
- The (syntax coloured) source code appears in the left
- source code window. IT CANNOT BE EDITED, but ONLY VIEWED
-
- SPECIAL demos are those which run EVENTDRIVEN.
- (For example clock.py - or oldTurtleDemo.py which
- in the end expects a mouse click.): -
Press START button to start the demo.[](#l1.34)
- Until the EVENTLOOP is entered everything works[](#l1.36)
as in an ordinary demo script.[](#l1.37)
- When the EVENTLOOP is entered, you control the[](#l1.39)
application by using the mouse and/or keys (or it's[](#l1.40)
controlled by some timer events)[](#l1.41)
To stop it you can and must press the STOP button.[](#l1.42)
While the EVENTLOOP is running, the examples menu is disabled.[](#l1.44)
- Only after having pressed the STOP button, you may[](#l1.46)
restart it or choose another example script.[](#l1.47)
- In some rare situations there may occur interferences/conflicts
- between events concerning the demo script and those concerning the
- demo-viewer. (They run in the same process.) Strange behaviour may be
- the consequence and in the worst case you must close and restart the
- viewer.
- (2) How to add your own demos to the demo repository -
IMPORTANT! When imported, the demo should not modify the system[](#l1.61)
by calling functions in other modules, such as sys, tkinter, or[](#l1.62)
turtle. Global variables should be initialized in main().[](#l1.63)
be executed by the viewer (see provided example scripts).[](#l1.66)
It may return a string which will be displayed in the Label below[](#l1.67)
the source code window (when execution has finished.)[](#l1.68)
add the following at the end of the file:[](#l1.71)
"EVENTLOOP". This informs the demo viewer that the script is[](#l1.80)
still running and must be stopped by the user
If an "EVENTLOOP" demo runs by itself, as with clock, which uses[](#l1.83)
ontimer, or minimal_hanoi, which loops by recursion, then the[](#l1.84)
code should catch the turtle.Terminator exception that will be[](#l1.85)
raised when the user presses the STOP button. (Paint is not such[](#l1.86)
a demo; it only acts in response to mouse clicks and movements.)[](#l1.87)