This should finally fix #6896. Let's watch the buildbots.
[python.git] / Demo / turtle / demohelp.txt
blobd565691f6d78c8b10804340df180d6ab0e733ffe
3   ----------------------------------------------
5       xturtleDemo - Help
7   ----------------------------------------------
9   This document has two sections:
11   (1) How to use the demo viewer
12   (2) How to add your own demos to the demo repository
15   (1) How to use the demo viewer.
17   Select a demoscript from the example menu.
18   The (syntax coloured) source code appears in the left
19   source code window. IT CANNOT BE EDITED, but ONLY VIEWED!
21   - Press START button to start the demo.
22   - Stop execution by pressing the STOP button.
23   - Clear screen by pressing the CLEAR button.
24   - Restart by pressing the START button again.
26   SPECIAL demos are those which run EVENTDRIVEN.
27   (For example clock.py - or oldTurtleDemo.py which
28   in the end expects a mouse click.):
30       Press START button to start the demo.
32       - Until the EVENTLOOP is entered everything works
33       as in an ordinary demo script.
35       - When the EVENTLOOP is entered, you control the
36       application by using the mouse and/or keys (or it's
37       controlled by some timer events)
38       To stop it you can and must press the STOP button.
40       While the EVENTLOOP is running, the examples menu is disabled.
42       - Only after having pressed the STOP button, you may
43       restart it or choose another example script.
45    * * * * * * * *
46    In some rare situations there may occur interferences/conflicts
47    between events concerning the demo script and those concerning the
48    demo-viewer. (They run in the same process.) Strange behaviour may be
49    the consequence and in the worst case you must close and restart the
50    viewer.
51    * * * * * * * *
54    (2) How to add your own demos to the demo repository
56    - scriptname: must begin with tdemo_ ,
57      so it must have the form tdemo_<your-script-name>.py
59    - place: same directory as xturtleDemo.py or some
60      subdirectory, the name of which must also begin with
61      tdemo_.....
63    - requirements on source code:
64        code must contain a main() function which will
65        be executed by the viewer (see provided example scripts)
66        main() may return a string which will be displayed
67        in the Label below the source code window (when execution
68        has finished.) 
70        !! For programs, which are EVENT DRIVEN, main must return
71        !! the string "EVENTLOOP". This informs the viewer, that the
72        !! script is still running and must be stopped by the user!
74         
75