onupdate called next ##############################################################################clock composite object ##############################################################################checkspersec second change timer class clock(frame)def __init__(selfconfig=clockconfigparent=none)frame __init__(selfparentself cfg config self makewidgets(parentchildren are packed but self labelon clients pack or grid me self display self digitaldisplay self lastsec self lastmin - self countdownseconds self onswitchmode(noneself ontimer(def makewidgets(selfparent)self digitaldisplay digitaldisplay(selfself cfgself analogdisplay analogdisplay(selfself cfgself datelabel label(selfbd= bg='red'fg='blue'parent bind(''self onswitchmodeparent bind(''self ontogglelabelparent bind(''self onresizeparent bind(''self oncountdownsecparent bind(''self oncountdownmindef onswitchmode(selfevent)self display pack_forget(if self display =self analogdisplayself display self digitaldisplay elseself display self analogdisplay self display pack(side=topexpand=yesfill=bothdef ontogglelabel(selfevent)self labelon + if self labelon self datelabel pack(side=bottomfill=xelseself datelabel pack_forget(self update(def onresize(selfevent)if event widget =self displayself display onresize(event widthevent heightself cfgdef ontimer(self)secssinceepoch time time(timetuple time localtime(secssinceepochhourminsec timetuple[ : complete gui programs