An Intro to
Programming
with Python

Fall 2006
course
navigation

sep 25

chap 5

# sample graphics commands $ python >>> from graphics import * >>> dir() # show me what's defined here >>> help(Line) # tell me about this thing >>> win = GraphWin() # make one of these things (200 x 200) >>> p1 = Point(50,60) # ditto >>> p2 = Point(140,100) # and another >>> p1.draw(win) >>> p2.draw(win) >>> line = Line(p1,p2) # make one of these things >>> line.draw(win) # and let me see it
This module has lots of bells and whistles.
"As usual, the best way to learn new concepts is to roll up your sleeves and try out some examples." - the text
Section 5.8 : Graphics Module Reference
http://cs.marlboro.edu/ courses/ fall2006/python/ notes/ sep_25
last modified Monday September 25 2006 1:38 pm EDT