trykeymap[event char](selfexcept keyerrorself settextinfo('press for help'def changedraw(selfmethodname)self createmethod method unbound canvas method self settextinfo('draw object=namedef changeoption(selflistname)list append(list[ ]del list[ self settextinfo('% =% (namelist[ ])def deleteobject(self)if self object !self textinfoself canvas delete(self objectself object none def raiseobject(self)if self objectself canvas tkraise(self objectok if object in moving erases but move goes on ok if moving raises while moving def lowerobject(self)if self objectself canvas lower(self objectdef fillobject(self)if self objecttype self canvas type(self objectif type ='image'pass elif type ='text'self canvas itemconfig(self objectfill=pickfills[ ]elseself canvas itemconfig(self objectfill=pickfills[ ]width=pickwidths[ ]def fillbackground(self)self canvas config(bg=pickfills[ ]def addphotoitem(self)if not self wherereturn filetypes=[('gif files'gif')('all files''*')file askopenfilename(initialdir=picdirfiletypes=filetypesif fileimage photoimage(file=fileload image self images append(imagekeep reference self object self canvas create_imageadd to canvas self where xself where yat last spot image=imageanchor=nwdef savepostscript(self)file asksaveasfilename(pydrawpainting and moving graphics