''' Purpose: demonstrate simple drawing commands ''' from PIL import Image, ImageDraw def picture() : # replace dimensions and background as you see fit WIDTH = 475 HEIGHT = 500 DIMENSIONS = [ WIDTH, HEIGHT] BACKGROUND_COLOR = "black" # create image of appropriate size im = Image.new( 'RGB', DIMENSIONS, BACKGROUND_COLOR ) # get a drawable canvas of image im canvas = ImageDraw.Draw( im ) # put your drawing commands here # return the art return im