This should finally fix #6896. Let's watch the buildbots.
[python.git] / Demo / turtle / tdemo_peace.py
blobea57069028ed1cbcc918a224f78b8c14edfe690f
1 #!/usr/bin/python
2 """ turtle-example-suite:
4 tdemo_peace.py
6 A very simple drawing suitable as a beginner's
7 programming example.
9 Uses only commands, which are also available in
10 old turtle.py.
12 Intentionally no variables are used except for the
13 colorloop:
14 """
16 from turtle import *
18 def main():
19 peacecolors = ("red3", "orange", "yellow",
20 "seagreen4", "orchid4",
21 "royalblue1", "dodgerblue4")
23 reset()
24 s = Screen()
25 up()
26 goto(-320,-195)
27 width(70)
29 for pcolor in peacecolors:
30 color(pcolor)
31 down()
32 forward(640)
33 up()
34 backward(640)
35 left(90)
36 forward(66)
37 right(90)
39 width(25)
40 color("white")
41 goto(0,-170)
42 down()
44 circle(170)
45 left(90)
46 forward(340)
47 up()
48 left(180)
49 forward(170)
50 right(45)
51 down()
52 forward(170)
53 up()
54 backward(170)
55 left(90)
56 down()
57 forward(170)
58 up()
60 goto(0,300) # vanish if hideturtle() is not available ;-)
61 return "Done!!"
63 if __name__ == "__main__":
64 main()
65 mainloop()