annotate docs/pycon2010/graph.py @ 363:2b2836b783be

added hook pic
author cat@eee
date Thu, 18 Feb 2010 13:45:43 -0500
parents 8a5bc9f5c28e
children
rev   line source
344
catherine@Drou
parents:
diff changeset
1 from turtle import *
catherine@Drou
parents:
diff changeset
2 pu()
catherine@Drou
parents:
diff changeset
3 goto(-400,-400)
catherine@Drou
parents:
diff changeset
4
catherine@Drou
parents:
diff changeset
5 def label(txt):
catherine@Drou
parents:
diff changeset
6 write(txt, font=('Arial', 20, 'italic'))
351
8a5bc9f5c28e cmd2 docs
catherine@Drou
parents: 344
diff changeset
7 hideturtle()
8a5bc9f5c28e cmd2 docs
catherine@Drou
parents: 344
diff changeset
8 width(6)
344
catherine@Drou
parents:
diff changeset
9
catherine@Drou
parents:
diff changeset
10 def line(len, _label):
catherine@Drou
parents:
diff changeset
11 start = pos()
catherine@Drou
parents:
diff changeset
12 pd()
catherine@Drou
parents:
diff changeset
13 forward(len)
catherine@Drou
parents:
diff changeset
14 pu()
catherine@Drou
parents:
diff changeset
15 forward(30)
catherine@Drou
parents:
diff changeset
16 pd()
catherine@Drou
parents:
diff changeset
17 label(_label)
catherine@Drou
parents:
diff changeset
18 pu()
catherine@Drou
parents:
diff changeset
19 goto(start)
catherine@Drou
parents:
diff changeset
20
catherine@Drou
parents:
diff changeset
21 def tech(x, y, _label):
catherine@Drou
parents:
diff changeset
22 pu()
catherine@Drou
parents:
diff changeset
23 goto(x, y)
catherine@Drou
parents:
diff changeset
24 pd()
catherine@Drou
parents:
diff changeset
25 write(_label, font=('Arial', 40, 'bold'))
catherine@Drou
parents:
diff changeset
26 pu()
catherine@Drou
parents:
diff changeset
27
catherine@Drou
parents:
diff changeset
28 line(600, "Easy to write")
catherine@Drou
parents:
diff changeset
29 left(90)
catherine@Drou
parents:
diff changeset
30 line(600, "Easy to use")
catherine@Drou
parents:
diff changeset
31
catherine@Drou
parents:
diff changeset
32 tech(-360, 160, 'GUI')
catherine@Drou
parents:
diff changeset
33 tech(-390, 100, 'AJAX')
catherine@Drou
parents:
diff changeset
34 tech(-300, -10, 'webapp')
catherine@Drou
parents:
diff changeset
35 tech(190, -380, 'CLU')
351
8a5bc9f5c28e cmd2 docs
catherine@Drou
parents: 344
diff changeset
36 tech(60, -320, 'TUI')
344
catherine@Drou
parents:
diff changeset
37 tech(100, -210, 'cmd')
351
8a5bc9f5c28e cmd2 docs
catherine@Drou
parents: 344
diff changeset
38 tech(80, -80, 'cmd2')
344
catherine@Drou
parents:
diff changeset
39
catherine@Drou
parents:
diff changeset
40 while True:
catherine@Drou
parents:
diff changeset
41 pass