self loadnote(def onscale(selfvalue)self msecs int(valuedef onnote(self)if self editorgone has been destroyed return don' rebuildassume unwanted if self editorup#self savenote(if editor already open self editor pack_forget(save text?hide editor self editorup false else repack for expansion againelse won' expand now update between pack and insertelse line initially self editor pack(side=topexpand=yesfill=bothself editorup true else unhide/pack editor self update(see pyeditsame as loadfirst issue self loadnote(and load image note text def switchnote(self)if self editorupself savenote(self loadnote(save current image' note load note for new image def savenote(self)if self editorupcurrfile self editor getfilename(or self editor onsave(currtext self editor getalltext(but text may be empty if currfile and currtexttryopen(currfile' 'write(currtextexceptpass failure may be normal if run off cd def loadnote(self)if self image and self editoruprootext os path splitext(self image[ ]notefile root noteself editor setfilename(notefiletryself editor setalltext(open(notefileread()exceptself editor clearalltext(might not have note def onhelp(self)showinfo('about pyview''pyview version \nmay \ ( july )\ 'an image slide show\nprogramming python 'if __name__ ='__main__'import sys picdir /gifsif len(sys argv> complete gui programs