<s> import pygtk <EOL> pygtk . require ( '<STR_LIT>' ) <EOL> import gtk <EOL> class Table : <EOL> def callback ( self , widget , data = None ) : <EOL> print "<STR_LIT>" % data <EOL> def delete_event ( self , widget , event , data = None ) : <EOL> gtk . main_quit ( ) <EOL> return False <EOL> def __init__ ( self ) : <EOL> self . window = gtk . Window ( gtk . WINDOW_TOPLEVEL ) <EOL> self . window . set_title ( "<STR_LIT>" ) <EOL> self . window . connect ( "<STR_LIT>" , self . delete_event ) <EOL> self . window . set_border_width ( <NUM_LIT:20> ) <EOL> table = gtk . Table ( <NUM_LIT:2> , <NUM_LIT:2> , True ) <EOL> self . window . add ( table ) <EOL> button = gtk . Button ( "<STR_LIT>" ) <EOL> button . connect ( "<STR_LIT>" , self . callback , "<STR_LIT>" ) <EOL> table . attach ( button , <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:1> ) <EOL> button . show ( ) <EOL> button = gtk . Button ( "<STR_LIT>" ) <EOL> button . connect ( "<STR_LIT>" , self . callback , "<STR_LIT>" ) <EOL> table . attach ( button , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:0> , <NUM_LIT:1> ) <EOL> button . show ( ) <EOL> button = gtk . Button ( "<STR_LIT>" ) <EOL> button . connect ( "<STR_LIT>" , ( lambda w : gtk . main_quit ( ) ) ) <EOL> table . attach ( button , <NUM_LIT:0> , <NUM_LIT:2> , <NUM_LIT:1> , <NUM_LIT:2> ) <EOL> button . show ( ) <EOL> table . show ( ) <EOL> self . window . show ( ) <EOL> def main ( ) : <EOL> gtk . main ( ) <EOL> return <NUM_LIT:0> <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> t = Table ( ) <EOL> main ( ) </s>
