<s> import pygtk <EOL> pygtk . require ( '<STR_LIT>' ) <EOL> import gtk <EOL> class HelloWorld : <EOL> def hello ( self , widget , data = None ) : <EOL> print "<STR_LIT>" <EOL> def delete_event ( self , widget , event , data = None ) : <EOL> print "<STR_LIT>" <EOL> return False <EOL> def destroy ( self , widget , data = None ) : <EOL> print "<STR_LIT>" <EOL> gtk . main_quit ( ) <EOL> def __init__ ( self ) : <EOL> self . window = gtk . Window ( gtk . WINDOW_TOPLEVEL ) <EOL> self . window . connect ( "<STR_LIT>" , self . delete_event ) <EOL> self . window . connect ( "<STR_LIT>" , self . destroy ) <EOL> self . window . set_border_width ( <NUM_LIT:10> ) <EOL> self . button = gtk . Button ( "<STR_LIT>" ) <EOL> self . button . connect ( "<STR_LIT>" , self . hello , None ) <EOL> self . button . connect_object ( "<STR_LIT>" , gtk . Widget . destroy , self . window ) <EOL> self . window . add ( self . button ) <EOL> self . button . show ( ) <EOL> self . window . show ( ) <EOL> def main ( self ) : <EOL> gtk . main ( ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> hello = HelloWorld ( ) <EOL> hello . main ( ) </s>
