summaryrefslogtreecommitdiff
path: root/docs/pycon2010/schematic.py
diff options
context:
space:
mode:
authorCatherine Devlin <catherine.devlin@gmail.com>2012-05-26 20:02:41 -0400
committerCatherine Devlin <catherine.devlin@gmail.com>2012-05-26 20:02:41 -0400
commit720e40f652111da7e6ce1f84b75acb1fe268d2cb (patch)
tree0a1fd3be30ad0120fd79626638854d57b7f9edde /docs/pycon2010/schematic.py
downloadcmd2-git-720e40f652111da7e6ce1f84b75acb1fe268d2cb.tar.gz
Indicate change in repository host to bitbucket
Diffstat (limited to 'docs/pycon2010/schematic.py')
-rw-r--r--docs/pycon2010/schematic.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/pycon2010/schematic.py b/docs/pycon2010/schematic.py
new file mode 100644
index 00000000..80774859
--- /dev/null
+++ b/docs/pycon2010/schematic.py
@@ -0,0 +1,32 @@
+from turtle import *
+hideturtle()
+width(6)
+pensize = 10
+pu()
+goto(0,-400)
+
+def rectangle(x, y, _label):
+ pu()
+ seth(0)
+ backward(x / 2)
+ fontsize = 40
+ pd()
+ for i in range(2):
+ forward(x)
+ left(90)
+ forward(y)
+ left(90)
+ pu()
+ forward(x / 2)
+ left(90)
+ forward(y / 2 - fontsize)
+ pd()
+ write(_label, align='center', font=('Arial', fontsize, 'bold'))
+
+rectangle(800, 80, 'cmd')
+pu()
+forward(80)
+rectangle(200, 400, 'cmd2')
+
+while True:
+ pass