defaults--override in instance or subclass size bgfg 'beige''brownhhmhshcog 'black''navy''blue''redpicture none width=height facetick colors clock handscenter face photo file class photoclockconfig(clockconfig)sample configuration size picture /gifs/ora-pp gifbghhmh 'white''blue''orange##############################################################################digital display object ##############################################################################class digitaldisplay(frame)def __init__(selfparentcfg)frame __init__(selfparentself hour label(selfself mins label(selfself secs label(selfself ampm label(selffor label in self hourself minsself secsself ampmlabel config(bd= relief=sunkenbg=cfg bgfg=cfg fglabel pack(side=lefttbdcould expandand scale font on resize def onupdate(selfhourminssecsampmcfg)mins str(minszfill( self hour config(text=str(hour)width= self mins config(text=str(mins)width= self secs config(text=str(secs)width= self ampm config(text=str(ampm)width= or '% dx def onresize(selfnewwidthnewheightcfg)pass nothing to redraw here ##############################################################################analog display object ##############################################################################class analogdisplay(canvas)def __init__(selfparentcfg)canvas __init__(selfparentwidth=cfg sizeheight=cfg sizebg=cfg bgself drawclockface(cfgself hourhand self minshand self secshand self cog none def drawclockface(selfcfg)if cfg picture complete gui programs on start and resize draw ovalspicture