<s> from Tkinter import * <EOL> class MultiStatusBar ( Frame ) : <EOL> def __init__ ( self , master = None , ** kw ) : <EOL> if master is None : <EOL> master = Tk ( ) <EOL> Frame . __init__ ( self , master , ** kw ) <EOL> self . labels = { } <EOL> def set_label ( self , name , text = '<STR_LIT>' , side = LEFT ) : <EOL> if not self . labels . has_key ( name ) : <EOL> label = Label ( self , bd = <NUM_LIT:1> , relief = SUNKEN , anchor = W ) <EOL> label . pack ( side = side ) <EOL> self . labels [ name ] = label <EOL> else : <EOL> label = self . labels [ name ] <EOL> label . config ( text = text ) <EOL> def _test ( ) : <EOL> b = Frame ( ) <EOL> c = Text ( b ) <EOL> c . pack ( side = TOP ) <EOL> a = MultiStatusBar ( b ) <EOL> a . set_label ( "<STR_LIT>" , "<STR_LIT:hello>" ) <EOL> a . set_label ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> a . pack ( side = BOTTOM , fill = X ) <EOL> b . pack ( ) <EOL> b . mainloop ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> _test ( ) </s>
