<s> """<STR_LIT>""" <EOL> from tkinter import OptionMenu <EOL> from tkinter import _setit <EOL> import copy <EOL> class DynOptionMenu ( OptionMenu ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , master , variable , value , * values , ** kwargs ) : <EOL> kwargsCopy = copy . copy ( kwargs ) <EOL> if '<STR_LIT>' in list ( kwargs . keys ( ) ) : <EOL> del ( kwargs [ '<STR_LIT>' ] ) <EOL> OptionMenu . __init__ ( self , master , variable , value , * values , ** kwargs ) <EOL> self . config ( highlightthickness = kwargsCopy . get ( '<STR_LIT>' ) ) <EOL> self . variable = variable <EOL> self . command = kwargs . get ( '<STR_LIT>' ) <EOL> def SetMenu ( self , valueList , value = None ) : <EOL> """<STR_LIT>""" <EOL> self [ '<STR_LIT>' ] . delete ( <NUM_LIT:0> , '<STR_LIT:end>' ) <EOL> for item in valueList : <EOL> self [ '<STR_LIT>' ] . add_command ( label = item , <EOL> command = _setit ( self . variable , item , self . command ) ) <EOL> if value : <EOL> self . variable . set ( value ) </s>
