Back to index

python3.2  3.2.2
Functions | Variables
turtledemo.paint Namespace Reference

Functions

def switchupdown
def changecolor
def main

Variables

tuple msg = main()

Function Documentation

def turtledemo.paint.changecolor (   x = 0,
  y = 0 
)

Definition at line 28 of file paint.py.

00028 
00029 def changecolor(x=0, y=0):
00030     global colors
00031     colors = colors[1:]+colors[:1]
00032     color(colors[0])

Definition at line 33 of file paint.py.

00033 
00034 def main():
00035     global colors
00036     shape("circle")
00037     resizemode("user")
00038     shapesize(.5)
00039     width(3)
00040     colors=["red", "green", "blue", "yellow"]
00041     color(colors[0])
00042     switchupdown()
00043     onscreenclick(goto,1)
00044     onscreenclick(changecolor,2)
00045     onscreenclick(switchupdown,3)
00046     return "EVENTLOOP"

Here is the call graph for this function:

def turtledemo.paint.switchupdown (   x = 0,
  y = 0 
)

Definition at line 20 of file paint.py.

00020 
00021 def switchupdown(x=0, y=0):
00022     if pen()["pendown"]:
00023         end_fill()
00024         up()
00025     else:
00026         down()
00027         begin_fill()

Here is the caller graph for this function:


Variable Documentation

Definition at line 48 of file paint.py.